diff options
author | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-06-19 14:13:26 +0200 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-06-19 16:48:50 +0200 |
commit | b71650f367a97536a2fbb6ecaae0e046651ae9f5 (patch) | |
tree | e07b9104ae20937315ec292337220813e979f9bb /tests/run | |
parent | 7269b37ce4a5db902513ee96678823a6921a4593 (diff) | |
download | dotty-b71650f367a97536a2fbb6ecaae0e046651ae9f5.tar.gz dotty-b71650f367a97536a2fbb6ecaae0e046651ae9f5.tar.bz2 dotty-b71650f367a97536a2fbb6ecaae0e046651ae9f5.zip |
Fix wrong test in PatMat.
Call drop method directly if class derives from sequence.
I do not understand how callRuntime works in scalac. Calling this method requires implicit search.
Diffstat (limited to 'tests/run')
-rw-r--r-- | tests/run/t889.check | 1 | ||||
-rw-r--r-- | tests/run/t889.scala | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/tests/run/t889.check b/tests/run/t889.check new file mode 100644 index 000000000..67ca2bf46 --- /dev/null +++ b/tests/run/t889.check @@ -0,0 +1 @@ +first: a, rest: List() diff --git a/tests/run/t889.scala b/tests/run/t889.scala new file mode 100644 index 000000000..8e5d82412 --- /dev/null +++ b/tests/run/t889.scala @@ -0,0 +1,9 @@ +object Test extends dotty.runtime.LegacyApp { + + val a = List("a") + + a match { + case Seq("a", "b", rest : _*) => println("a, b, " + rest) + case Seq(first, rest : _*) => println("first: " + first + ", rest: " + rest) + } +} |