-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
REPL fresh name crash on first line of session #7934
Comments
Perhaps there is no line yet for the virtual source file but couldn't find where exactly it is set. |
Since only an underscore is required for the symptom, I hope they send me a dotty t-shirt for shortest crasher. To follow up @joroKr21 the selection is ➜ ~ dotr -J-XX:+ShowCodeDetailsInExceptionMessages
Starting dotty REPL...
scala> _
Exception in thread "main" java.lang.NullPointerException: Cannot invoke "dotty.tools.dotc.CompilationUnit.freshNames()" because the return value of "dotty.tools.dotc.core.Contexts$Context.compilationUnit()" is null
at dotty.tools.dotc.core.NameKinds$UniqueNameKind.fresh(NameKinds.scala:218) That really is a helpful NPE on JDK14. |
See #8098 for an alternative reproduction. |
PR for ParseResult. This contribution doubles my productivity to 2 LOC/month. |
minimized code
Stack trace
It works on the second line:
I contrived a fairly trivial example to illustrate my point as follows:
The text was updated successfully, but these errors were encountered: