diff options
Diffstat (limited to 'tests/untried/pos/t7433.scala')
-rw-r--r-- | tests/untried/pos/t7433.scala | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/untried/pos/t7433.scala b/tests/untried/pos/t7433.scala new file mode 100644 index 000000000..22e7e3434 --- /dev/null +++ b/tests/untried/pos/t7433.scala @@ -0,0 +1,10 @@ +object Test { + def foo(): Unit = { + try { + for (i <- 1 until 5) return + } catch { + case _: NullPointerException | _: RuntimeException => + // was: "catch block may intercept non-local return from method check" + } + } +} |