Closed
Description
$ cat abc.scala
class Two[@A A]
$ dotc abc.scala
-- Error: abc.scala ----------------------------------------------------------------------------------------------------
1 |class Two[@A A]
| ^
| cyclic reference involving type A
exception occurred while typechecking abc.scala
exception occurred while compiling abc.scala
Exception in thread "main" java.lang.AssertionError: assertion failed: duplicate attachment for key dotty.tools.dotc.util.Property$Key@4e50df2e
at scala.Predef$.assert(Predef.scala:165)
at dotty.tools.dotc.util.Attachment$Container$class.pushAttachment(Attachment.scala:92)
at dotty.tools.dotc.ast.Trees$Tree.pushAttachment(Trees.scala:56)
at dotty.tools.dotc.typer.Namer.typedAheadImpl(Namer.scala:779)
at dotty.tools.dotc.typer.Namer.typedAheadType(Namer.scala:785)
at dotty.tools.dotc.typer.Namer.typedAheadAnnotation(Namer.scala:794)
at dotty.tools.dotc.typer.Namer.typedAheadAnnotation(Namer.scala:793)
at dotty.tools.dotc.typer.Namer.typedAheadAnnotation(Namer.scala:791)
at dotty.tools.dotc.typer.Namer$Completer$$anonfun$addAnnotations$1.apply(Namer.scala:568)
at dotty.tools.dotc.typer.Namer$Completer$$anonfun$addAnnotations$1.apply(Namer.scala:567)
<snipped>