diff options
Diffstat (limited to 'tests/untried/pos/t8315b.scala')
-rw-r--r-- | tests/untried/pos/t8315b.scala | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/untried/pos/t8315b.scala b/tests/untried/pos/t8315b.scala new file mode 100644 index 000000000..d7a2bf565 --- /dev/null +++ b/tests/untried/pos/t8315b.scala @@ -0,0 +1,11 @@ +object Test extends Object { + def crash: Unit = { + val key = "" + try map(new F(key)) + catch { case _: Throwable => } + }; + final def map(f: F): Any = f.apply(""); +}; +final class F(key: String) { + final def apply(a: Any): Any = throw new RuntimeException(key); +} |