summaryrefslogtreecommitdiff
path: root/test/files/neg/t1672b.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/neg/t1672b.scala')
-rw-r--r--test/files/neg/t1672b.scala41
1 files changed, 41 insertions, 0 deletions
diff --git a/test/files/neg/t1672b.scala b/test/files/neg/t1672b.scala
new file mode 100644
index 0000000000..7d02ddc710
--- /dev/null
+++ b/test/files/neg/t1672b.scala
@@ -0,0 +1,41 @@
+object Test {
+ @annotation.tailrec
+ def bar : Nothing = {
+ try {
+ throw new RuntimeException
+ } catch {
+ case _: Throwable => bar
+ } finally {
+ bar
+ }
+ }
+
+ @annotation.tailrec
+ def baz : Nothing = {
+ try {
+ throw new RuntimeException
+ } catch {
+ case _: Throwable => baz
+ } finally {
+ ???
+ }
+ }
+
+ @annotation.tailrec
+ def boz : Nothing = {
+ try {
+ throw new RuntimeException
+ } catch {
+ case _: Throwable => boz; ???
+ }
+ }
+
+ @annotation.tailrec
+ def bez : Nothing = {
+ try {
+ bez
+ } finally {
+ ???
+ }
+ }
+}