-
Notifications
You must be signed in to change notification settings - Fork 26
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
Failed evaluation in dotty #425
Comments
Minimized code: object Rewrites {
private class Patch(val span: Span)
def main(args: Array[String]): Unit = {
val patch = Patch(Span(0))
println("ok")
}
}
class Span(start: Int) extends AnyVal The problem seems to be with private classes having value classes as attributes |
Hum, I'm trying to print the trees generated by the compiler, but even when passing |
I think the Lines 30 to 113 in 33e8272
You should be able to get the stack trace of this exception by inspecting it in the debug console or by wrapping the debug console in a Lines 30 to 113 in 33e8272
|
Here's what I get when try-catching in the debug console 🙃 $ try { patch.span } catch { case e => e.getStackTrace() }
> 0
$ patch.span
> IllegalArgumentException@1232 "java.lang.IllegalArgumentException: object is not an instance of declaring class"
$ try { patch.span } catch { case e => println(e.getStackTrace()) }
> 0 |
Huh that's weird. Is |
Yes |
In dotty
dotty.tools.dotc.rewrites.Rewrites.scala
, evaluation ofpbuf(2).span
fails with:The text was updated successfully, but these errors were encountered: