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 crash rather than message "XXZ is not an enclosing class" in erroneous code #8534
Comments
Imported From: https://issues.scala-lang.org/browse/SI-8534?orig=1
|
@adriaanm said: PS: I recommend putting the opening brace on the same line as the class definition, as in trait MyTrait {
... |
@adriaanm said: trait MyTrait { type T; case class SomeData(x: T) }
class BugTest {
def isTheBugHere(in: MyTrait#SomeData) = false
} |
Igor Rumiha (igorrumiha) said: |
@retronym said: |
@retronym said: object line1 {
trait MyTrait
}
object line2 {
import line2._
class BugTest {def isTheBugHere(in: MyTrait.this.type#SomeData) = false}
}
|
@retronym said: |
@adriaanm said: |
@retronym said: |
@retronym said: |
Welcome to Scala version 2.11.0 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0).
Type in expressions to have them evaluated.
Type :help for more information.
scala> trait MyTrait {type T; case class SomeData(x: T)}
defined trait MyTrait
scala> class BugTest {def isTheBugHere(in: MyTrait.this.type#SomeData) = false}
:7: error: MyTrait is not an enclosing class
class BugTest {def isTheBugHere(in: MyTrait.this.type#SomeData) = false}
^
The text was updated successfully, but these errors were encountered: