New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compiler throws java.lang.NegativeArraySizeException #9786
Comments
Imported From: https://issues.scala-lang.org/browse/SI-9786?orig=1 |
@retronym said: We'd need to see a standalone example to be able to fix this (or to confirm that its a known bug) |
@retronym said:
ie. does it show up with |
Jens Kleemann (jens-0) said: scalacOptions in Compile ++= Seq(
"-Ynooptimise",
"-Yclosure-elim",
"-Yconst-opt",
"-Ydead-code",
//"-Yinline", // TODO: Causes NegativeArraySizeException in Build
"-Yinline-handlers"
) it compiles fine. There is following debug output: !!! Mismatched stacks in ReachingDefinitions#lub2: List(ListSet((26,0), (21,0), (17,0), (16,2), (11,2), (10,2), (9,2), (4,2))), List(ListSet((9,2)), ListSet((27,1))), returning List(ListSet((26,0), (21,0), (17,0), (16,2), (11,2), (10,2), (9,2), (4,2)))�[0m !!! Mismatched stacks in ReachingDefinitions#lub2: List(ListSet((5,1), (5,5))), List(ListSet((5,5)), ListSet((5,1)), ListSet((5,0))), returning List(ListSet((5,1), (5,5)))�[0m �[0m[�[0minfo�[0m] �[0m[log jvm] Generating code for block: 15�[0m With -Ydebug and Ylog:jvm you can see this exception: java.lang.AssertionError: assertion failed: List(module package$RichActorRef, module package$RichActorRef) |
@retronym said (edited on May 19, 2016 11:26:09 AM UTC): package object foo { implicit class RichActorRef(...) } with package foo
class RichActorRef
package object foo {
implicit def enrichActorRef(): RichActorRef = ...
} I suspect that will get rid of the duplicate symbol exceptions at the end of your last comment. Not sure if we've got an open bug for that or not, but all the associated code has been rewritten in the new backend in 2.12, so that problem will be gone. |
@SethTisue said: |
Sometimes the compiler stops throwing an java.lang.NegativeArraySizeException. This is not deterministic and changing some arbitrary code can solve this problem until it reappears suddenly.
It is may be related to this issue
Disable the optimization with
seems to solve it. But that is no solution of course.
This is the trace:
The text was updated successfully, but these errors were encountered: