-
Notifications
You must be signed in to change notification settings - Fork 21
Unexpected compilation error while calling Scala from Java #12556
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
Comments
java15 and scala2.13.x also find error. object Test {
// $ cat Bar.scala:
trait Bar[F] {
def f : F
final def bar: F = f // the real life example is more involved here
}
// ==================================================
//$ cat Foo.scala:
class Foo() extends Bar[Foo] {
override def f: Foo = this
}
val useInScala = new Foo().bar
} show-trees, There have a <stable> <accessor> def useInScala(): sandbox.Test.Foo = Test.this.useInScala;
def <init>(): sandbox.Test.type = {
Test.super.<init>();
Test.this.useInScala = new sandbox.Test.Foo().bar().$asInstanceOf[sandbox.Test.Foo]();
()
} |
I think this is #8905. |
So it seems impossible to solve? |
Closing as duplicate. If someone is interested in reviving efforts to address #8905, let's discuss that there rather than here. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reproduction steps
Scala version: 2.13.8 (also in 2.12.x)
Problem
See more details on Scala Users: https://users.scala-lang.org/t/issue-with-calling-scala-code-from-java/8321
The text was updated successfully, but these errors were encountered: