-
Notifications
You must be signed in to change notification settings - Fork 1.1k
REPL crash when compiling lambda to anonymous class #5345
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
This is not specific to This happens when we exercice the following code path in the REPL: https://github.com/lampepfl/dotty/blob/0fcbfdb752fa22ed1b9c5f5ebf99382aa0f76ead/compiler/src/dotty/tools/dotc/transform/ExpandPrivate.scala#L86-L88 We exercice this code path when we compile a lambda to an anonymous class: scala> trait Foo extends Function1[Int, Int]; (_ => 1): Foo
Exception in thread "main" java.lang.AssertionError: assertion failed: private method $anonfun in rs$line$2 accessed from method apply in null
at scala.Predef$.assert(Predef.scala:219)
at dotty.tools.dotc.transform.ExpandPrivate.ensurePrivateAccessible(ExpandPrivate.scala:89)
at dotty.tools.dotc.transform.ExpandPrivate.transformSelect(ExpandPrivate.scala:99)
at dotty.tools.dotc.transform.ExpandPrivate.transformSelect(ExpandPrivate.scala:32)
... |
ImplicitConverter
Already fixed, regression test in #5800. |
This doesn't happen outside the REPL, or when we don't use
ImplicitConverter
.The text was updated successfully, but these errors were encountered: