diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-09-05 17:04:34 +0200 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2013-09-06 17:29:21 +0200 |
commit | 3e1631e8f71f73f5275b1595bd85de25625bb2de (patch) | |
tree | e6542f461fc4515a231522bccb7117d5feccc255 /test/files/presentation/partial-fun | |
parent | a8c05274f738943ae58ecefda4b012b9daf5d8dc (diff) | |
download | scala-3e1631e8f71f73f5275b1595bd85de25625bb2de.tar.gz scala-3e1631e8f71f73f5275b1595bd85de25625bb2de.tar.bz2 scala-3e1631e8f71f73f5275b1595bd85de25625bb2de.zip |
SI-7643 Enable newPatternMatching in interactive.
Without it, the enclosed test fails with:
ArrayBuffer(Problem(RangePosition(partial-fun/src/PartialFun.scala, 62, 62, 77),type mismatch;
found : Int => Int
required: PartialFunction[Int,Int],2))
And with that, we can remove this option altogether.
Diffstat (limited to 'test/files/presentation/partial-fun')
-rw-r--r-- | test/files/presentation/partial-fun/Runner.scala | 10 | ||||
-rw-r--r-- | test/files/presentation/partial-fun/partial-fun.check | 1 | ||||
-rw-r--r-- | test/files/presentation/partial-fun/src/PartialFun.scala | 5 |
3 files changed, 16 insertions, 0 deletions
diff --git a/test/files/presentation/partial-fun/Runner.scala b/test/files/presentation/partial-fun/Runner.scala new file mode 100644 index 0000000000..3edd5bb5b0 --- /dev/null +++ b/test/files/presentation/partial-fun/Runner.scala @@ -0,0 +1,10 @@ +import scala.tools.nsc.interactive.tests.InteractiveTest + +object Test extends InteractiveTest { + override def runDefaultTests() { + sourceFiles foreach (src => askLoadedTyped(src).get) + super.runDefaultTests() + + println(compiler.unitOfFile.values.map(_.problems).mkString("", "\n", "")) + } +} diff --git a/test/files/presentation/partial-fun/partial-fun.check b/test/files/presentation/partial-fun/partial-fun.check new file mode 100644 index 0000000000..adceab8280 --- /dev/null +++ b/test/files/presentation/partial-fun/partial-fun.check @@ -0,0 +1 @@ +reload: PartialFun.scala diff --git a/test/files/presentation/partial-fun/src/PartialFun.scala b/test/files/presentation/partial-fun/src/PartialFun.scala new file mode 100644 index 0000000000..4657898ed1 --- /dev/null +++ b/test/files/presentation/partial-fun/src/PartialFun.scala @@ -0,0 +1,5 @@ +class A { + def foo { + val x: PartialFunction[Int, Int] = ({ case 0 => 0 }) + } +} |