diff options
author | Adriaan Moors <adriaan.moors@epfl.ch> | 2012-07-19 00:48:02 -0700 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2012-07-19 00:48:02 -0700 |
commit | 92716b54847418565526dc6ec57c6521d1c0c807 (patch) | |
tree | cdc802d6c05f7114505d71a0d7c9bb3345e96d74 /test/files/run | |
parent | a4b7928c55c362ce489ae9ba480d2b31844ce0f1 (diff) | |
parent | fa1dc5afea96d5917bc8a4883e3ee2d23db4744e (diff) | |
download | scala-92716b54847418565526dc6ec57c6521d1c0c807.tar.gz scala-92716b54847418565526dc6ec57c6521d1c0c807.tar.bz2 scala-92716b54847418565526dc6ec57c6521d1c0c807.zip |
Merge pull request #939 from adriaanm/ticket-6089
SI-6089 better tail position analysis for matches
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/t6089.check | 1 | ||||
-rw-r--r-- | test/files/run/t6089.scala | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/test/files/run/t6089.check b/test/files/run/t6089.check new file mode 100644 index 0000000000..a8d4424106 --- /dev/null +++ b/test/files/run/t6089.check @@ -0,0 +1 @@ +scala.MatchError: Foo(0) (of class Foo) diff --git a/test/files/run/t6089.scala b/test/files/run/t6089.scala new file mode 100644 index 0000000000..c72d7ba792 --- /dev/null +++ b/test/files/run/t6089.scala @@ -0,0 +1,13 @@ +case class Foo(x: Int) + +object Test { + def bippo(result: Boolean): Boolean = result + def bungus(m: Foo): Boolean = + bippo(m match { case Foo(2) => bungus(m) }) + + def main(args: Array[String]): Unit = try { + bungus(Foo(0)) + } catch { + case x: MatchError => println(x) + } +}
\ No newline at end of file |