diff options
Diffstat (limited to 'tests/run/t5375.scala')
-rw-r--r-- | tests/run/t5375.scala | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/run/t5375.scala b/tests/run/t5375.scala index 8c2c06fde..256f5435e 100644 --- a/tests/run/t5375.scala +++ b/tests/run/t5375.scala @@ -1,8 +1,11 @@ -object Test extends dotty.runtime.LegacyApp { +object Test { val foos = (1 to 1000).toSeq - try - foos.par.map(i => if (i % 37 == 0) sys.error("i div 37") else i) - catch { - case ex: RuntimeException => println("Runtime exception") + + def main(args: Array[String]): Unit = { + try + foos.par.map(i => if (i % 37 == 0) sys.error("i div 37") else i) + catch { + case ex: RuntimeException => println("Runtime exception") + } } } |