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
Assertion failed: Invalid interfaces #10107
Comments
Imported From: https://issues.scala-lang.org/browse/SI-10107?orig=1
|
@lrytz said: |
@lrytz said: private class ProblemClass implements InnerInterface { } to private class ProblemClass implements A.Inner.InnerInterface { } |
@lrytz said: Changing the example a little: A.java public class A {
public static class AInner {
public static interface InnerInterface { }
}
} B.java public class B {
public static class BInner extends A.AInner {
public class ProblemClass implements InnerInterface { }
}
} Test.scala object Main {
def main(args: Array[String]): Unit = {
// new B() // this still causes the crash reported in this ticket
val bi = new B.BInner
new bi.ProblemClass()
}
} The above doesn't compile (in mixed compilation), neither on 2.11, nor on 2.12:
This is due to the way the Scala compiler interprets Java static member classes, see #9111. When the Scala code does |
Jillian Crossley (jillianc) said: |
@lrytz said: |
…12.2: https://issues.scala-lang.org/browse/SI-10107 Here I implement the workaround given here: scala/bug#10107 (comment) but it generates another Scala issue.
…12.2: https://issues.scala-lang.org/browse/SI-10107 Here I implement the workaround given here: scala/bug#10107 (comment). BIS
The first example fixed in 2.12.3 perhaps scala/scala#5792 and the second, revised example under the linked issue in 2.12.9/2.13.0. |
Reproduction case:
When I compile with ./sbt ++2.12.1, I get:
This compiles fine on 2.11.
The text was updated successfully, but these errors were encountered: