Skip to content

Commit 3926ddf

Browse files
committed
Avoid deadlock in runtest t5375.scala
See #624 (comment) for a lengthy explanation.
1 parent dd80fe0 commit 3926ddf

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

tests/run/t5375.scala

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
object Test extends dotty.runtime.LegacyApp {
1+
object Test {
22
val foos = (1 to 1000).toSeq
3-
try
4-
foos.par.map(i => if (i % 37 == 0) sys.error("i div 37") else i)
5-
catch {
6-
case ex: RuntimeException => println("Runtime exception")
3+
4+
def main(args: Array[String]): Unit = {
5+
try
6+
foos.par.map(i => if (i % 37 == 0) sys.error("i div 37") else i)
7+
catch {
8+
case ex: RuntimeException => println("Runtime exception")
9+
}
710
}
811
}

0 commit comments

Comments
 (0)