diff options
author | odersky <odersky@gmail.com> | 2016-05-27 19:07:30 +0200 |
---|---|---|
committer | odersky <odersky@gmail.com> | 2016-05-27 19:07:30 +0200 |
commit | 5d6cc456564d54c21da583ed425e73a99a014a9c (patch) | |
tree | 3c91c40f9443212e4f3972a86d7a11718dfab3c9 /tests | |
parent | a77bf9f325daf54c158c654965917ba5f3d0b30f (diff) | |
parent | 3b0cb481e379ee07ce33d80a1bee5ff67c32eb40 (diff) | |
download | dotty-5d6cc456564d54c21da583ed425e73a99a014a9c.tar.gz dotty-5d6cc456564d54c21da583ed425e73a99a014a9c.tar.bz2 dotty-5d6cc456564d54c21da583ed425e73a99a014a9c.zip |
Merge pull request #1281 from dotty-staging/fix-lamda-lift
Fixes to lambdalift that prevent memory leaks.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/run/t5375.scala | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/run/t5375.scala b/tests/run/t5375.scala index 8c2c06fde..d8413c1a3 100644 --- a/tests/run/t5375.scala +++ b/tests/run/t5375.scala @@ -1,3 +1,14 @@ +/** Hello fellow compiler developer. + if you are wondering why does test suite hang on this test + then it's likely that the lambda inside map has been compiled into static method + unfotrunatelly, as it is executed inside static object initializer, + it is executed inside class-loader, in a synchronized block that is not source defined. + + If the lambda will be static Test$#foo, calling it through a different thread would require grabbing the + lock inside classloader. Unlike if it not static and is called through This(Test).foo, no lock is grabbed. + + @DarkDimius +*/ object Test extends dotty.runtime.LegacyApp { val foos = (1 to 1000).toSeq try |