diff options
author | Adriaan Moors <adriaan.moors@epfl.ch> | 2012-07-04 07:28:42 -0700 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2012-07-04 07:28:42 -0700 |
commit | cb066cc6af2e836d66593d2fec56bc2c6a786d1a (patch) | |
tree | 79e33807d1192c50835a98c3987df45225c28481 /test/files/run | |
parent | d033ced739068c3c40dc23d055dea1a0005fa39e (diff) | |
parent | 59300ee6e3fc2c34482c7fb10ee4f7b298a6fbce (diff) | |
download | scala-cb066cc6af2e836d66593d2fec56bc2c6a786d1a.tar.gz scala-cb066cc6af2e836d66593d2fec56bc2c6a786d1a.tar.bz2 scala-cb066cc6af2e836d66593d2fec56bc2c6a786d1a.zip |
Merge pull request #809 from dragos/issue/fix-5929
Fix SI-5929 - Verify error with finally and pattern match
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/patmat-finally.scala | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/files/run/patmat-finally.scala b/test/files/run/patmat-finally.scala new file mode 100644 index 0000000000..6f769b30a0 --- /dev/null +++ b/test/files/run/patmat-finally.scala @@ -0,0 +1,25 @@ +/** Test pattern matching and finally, see SI-5929. */ +object Test extends App { + def bar(s1: Object, s2: Object) { + s1 match { + case _ => + } + + try { + () + } finally { + s2 match { + case _ => + } + } + } + + def x = { + null match { case _ => } + + try { 1 } finally { while(false) { } } + } + + bar(null, null) + x +} |