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 loops infinitely[on multiple cores] when anon Iterator object tries to store 'this' #8865
Comments
Imported From: https://issues.scala-lang.org/browse/SI-8865?orig=1 |
@gourlaysama said: In 2.11.2, this prints: test.scala:5: error: type mismatch;
found : Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[Point]{def currentPosition: $anon; def currentPosition_=(x$1: Iterator[...]{def currentPosition: $anon; def currentPosition_=(x$1: ...{def currentPosition: $anon; def currentPosition_=(x$1: ...): ...}): Unit}): Unit}): Unit}): Unit}): Unit}): Unit}): Unit}): Unit}): Unit}): Unit}): Unit}): Unit}): Unit}): Unit}): Unit}): Unit}): Unit}): Unit}): Unit}): Unit}): Unit}): Unit}): Unit}): Unit}): Unit}): Unit}): Unit}): Unit}): Unit}): Unit}): Unit}): Unit}): Unit}): Unit}): Unit}): Unit}): Unit}): Unit}): Unit}): Unit}): Unit}): Unit}): Unit}): Unit}): Unit}): Unit}): Unit}): Unit}): Unit}
required: Point
def next:Point = currentPosition
^
one error found It was fixed in v2.11.0-RC1 (in 936d60a). |
Attempting to compile the following code will cause scalac to spin fruitlessly on multiple cores until the JVM runs out of memory
This appears to be due to the
var currentPosition = this
[when I introduced the bug into the code base I guess I was thinking 'this' would refer to the Point, it does not, of course. The compiler should complain atdef next...
]The text was updated successfully, but these errors were encountered: