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

Compiler crashes after issuing error for non-accessible annotation #11607

Open
lrytz opened this issue Jul 3, 2019 · 0 comments

Comments

Projects
None yet
2 participants
@lrytz
Copy link
Member

commented Jul 3, 2019

import scala.annotation.migration
@migration("", "") class C

With 2.13, the compiler shows the error, then crashes. 2.12 is not affected.

➜  scalac Test.scala
Test.scala:2: error: class migration in package annotation cannot be accessed in package annotation
@migration("", "") class C
 ^
error: java.lang.NullPointerException
	at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typedAnnotation$1(Typers.scala:3940)
	at scala.tools.nsc.typechecker.Typers$Typer.typedAnnotation(Typers.scala:3834)
	at scala.tools.nsc.typechecker.Namers$Namer.$anonfun$annotSig$3(Namers.scala:1866)
	at scala.reflect.internal.AnnotationInfos$LazyAnnotationInfo.forcedInfo$lzycompute(AnnotationInfos.scala:158)
	at scala.reflect.internal.AnnotationInfos$LazyAnnotationInfo.forcedInfo(AnnotationInfos.scala:158)
	at scala.reflect.internal.AnnotationInfos$LazyAnnotationInfo.completeInfo(AnnotationInfos.scala:171)
	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1998)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.