Closed
Description
scalac can compile but dotc crashes.
$ cat abc.scala
class foo(annotation: Any) extends annotation.StaticAnnotation
@foo(new AnyRef {}) trait A
$ dotc abc.scala
-- [E008] Member Not Found Error: abc.scala ------------------------------------
1 |class foo(annotation: Any) extends annotation.StaticAnnotation
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
| type `StaticAnnotation` is not a member of Any(annotation)
exception occurred while typechecking abc.scala
exception occurred while compiling abc.scala
Exception in thread "main" java.lang.IllegalArgumentException: requirement failed
at scala.Predef$.require(Predef.scala:207)
at dotty.tools.dotc.core.SymDenotations$ClassDenotation.enterNoReplace(SymDenotations.scala:1538)
at dotty.tools.dotc.core.SymDenotations$ClassDenotation.enter(SymDenotations.scala:1528)
at dotty.tools.dotc.typer.NamerContextOps$class.enter(Namer.scala:36)
at dotty.tools.dotc.core.Contexts$Context.enter(Contexts.scala:57)
at dotty.tools.dotc.typer.Namer.enterSymbol(Namer.scala:339)
at dotty.tools.dotc.typer.Namer.dotty$tools$dotc$typer$Namer$$recur$1(Namer.scala:437)
<snipped>
Metadata
Metadata
Assignees
Labels
No labels