diff options
author | Guillaume Martres <smarter@ubuntu.com> | 2015-05-30 19:04:23 +0200 |
---|---|---|
committer | Guillaume Martres <smarter@ubuntu.com> | 2015-05-30 19:53:31 +0200 |
commit | 8f90105dc4e62e78d53b385df1b2eb29f2855183 (patch) | |
tree | cd9bac9ad514ce3e592217962ac319d0ce0d34f4 /tests/run/t5375.scala | |
parent | dd80fe09cdf4f83efbdf3b7e88f9c686e2a6c137 (diff) | |
download | dotty-8f90105dc4e62e78d53b385df1b2eb29f2855183.tar.gz dotty-8f90105dc4e62e78d53b385df1b2eb29f2855183.tar.bz2 dotty-8f90105dc4e62e78d53b385df1b2eb29f2855183.zip |
Avoid static initialization deadlock in run tests.
See https://github.com/lampepfl/dotty/pull/624#issuecomment-107064519
for a lengthy explanation.
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") + } } } |