Skip to content

crash with assertion failed: duplicate attachment for key ... #1649

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

Closed
helloqirun opened this issue Nov 1, 2016 · 2 comments
Closed

crash with assertion failed: duplicate attachment for key ... #1649

helloqirun opened this issue Nov 1, 2016 · 2 comments

Comments

@helloqirun
Copy link

$ 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>
@liufengyun
Copy link
Contributor

Thanks @helloqirun , report confirmed !

@liufengyun liufengyun self-assigned this Nov 7, 2016
odersky added a commit to dotty-staging/dotty that referenced this issue Nov 10, 2016
This PR also fixes scala#1649
@odersky
Copy link
Contributor

odersky commented Nov 10, 2016

Fixed by #1693

@odersky odersky closed this as completed Nov 10, 2016
odersky added a commit to dotty-staging/dotty that referenced this issue Nov 24, 2016
This PR also fixes scala#1649
odersky added a commit to dotty-staging/dotty that referenced this issue Dec 1, 2016
This PR also fixes scala#1649
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants