Skip to content
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

java.lang.NoSuchFieldError: $outer when mixing Scala and Java #7246

Closed
scabug opened this issue Mar 12, 2013 · 2 comments
Closed

java.lang.NoSuchFieldError: $outer when mixing Scala and Java #7246

scabug opened this issue Mar 12, 2013 · 2 comments
Assignees
Milestone

Comments

@scabug
Copy link

@scabug scabug commented Mar 12, 2013

public class Outer {
    public class Inner {
    }
}
// Test.scala
object Test extends App {

  val so = new SubOuter
  val si = new so.SubInner
  println(si.bar)
}

class SubOuter extends Outer {

  val foo = "hello"

  class SubInner extends Inner {
    def bar = foo
  }

}

Worked in 2.9, throws NoSuchFieldError: $outer in 2.10. Error only occurs when defining Outer and Inner in Java; equivalent definitions of Outer and Inner in Scala don't cause the regression.

@scabug
Copy link
Author

@scabug scabug commented Mar 12, 2013

Imported From: https://issues.scala-lang.org/browse/SI-7246?orig=1
Reporter: Ryan Hendrickson (ryan.hendrickson_bwater)
Affected Versions: 2.10.0

@scabug
Copy link
Author

@scabug scabug commented Mar 16, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants