Skip to content

Assertion failed: duplicate attachment for key #9294

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
sir-wabbit opened this issue Jul 6, 2020 · 0 comments · Fixed by #9320
Closed

Assertion failed: duplicate attachment for key #9294

sir-wabbit opened this issue Jul 6, 2020 · 0 comments · Fixed by #9320

Comments

@sir-wabbit
Copy link

sir-wabbit commented Jul 6, 2020

Minimized code

// AE-6ca12c750b9a6e3dfc09fc327aa00146074fe260
@foo class foo[X]

Output (click arrow to expand)

-- [E046] Cyclic Error: test.scala:1:1 -----------------------------------------
1 |@foo class foo[X]
  | ^
  | Cyclic reference involving class foo

longer explanation available when compiling with `-explain`
exception occurred while typechecking test.scala
exception occurred while compiling test.scala
java.lang.AssertionError: assertion failed: duplicate attachment for key dotty.tools.dotc.util.Property$Key@3676ac27 while compiling test.scala
Exception in thread "main" java.lang.AssertionError: assertion failed: duplicate attachment for key dotty.tools.dotc.util.Property$Key@3676ac27
	at dotty.DottyPredef$.assertFail(DottyPredef.scala:17)
	at dotty.tools.dotc.util.Attachment$Container.pushAttachment(Attachment.scala:118)
	at dotty.tools.dotc.ast.Trees$Tree.pushAttachment(Trees.scala:56)
	at dotty.tools.dotc.typer.Namer.recordSym(Namer.scala:266)
	at dotty.tools.dotc.typer.Namer.createOrRefine$1(Namer.scala:382)
	at dotty.tools.dotc.typer.Namer.createSymbol(Namer.scala:435)
	at dotty.tools.dotc.typer.Namer.recur$1(Namer.scala:542)
	at dotty.tools.dotc.typer.Namer.indexExpanded(Namer.scala:552)
	at dotty.tools.dotc.typer.Namer.index(Namer.scala:525)
	at dotty.tools.dotc.typer.Namer$ClassCompleter.completeConstructor(Namer.scala:1225)
	at dotty.tools.dotc.typer.Namer$ClassCompleter.completeInCreationContext(Namer.scala:1308)
	at dotty.tools.dotc.typer.Namer$Completer.complete(Namer.scala:851)
	at dotty.tools.dotc.core.SymDenotations$SymDenotation.completeFrom(SymDenotations.scala:259)
	at dotty.tools.dotc.core.Denotations$Denotation.completeInfo$1(Denotations.scala:188)
	at dotty.tools.dotc.core.Denotations$Denotation.info(Denotations.scala:190)
	at dotty.tools.dotc.core.SymDenotations$SymDenotation.ensureCompleted(SymDenotations.scala:445)
	at dotty.tools.dotc.typer.Typer.retrieveSym(Typer.scala:2318)
	at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:2343)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2435)
	at dotty.tools.dotc.typer.Typer.op$1(Typer.scala:2502)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2511)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2514)
	at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:2536)
	at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:2581)
	at dotty.tools.dotc.typer.Typer.typedPackageDef(Typer.scala:2160)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2408)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2436)
	at dotty.tools.dotc.typer.Typer.op$1(Typer.scala:2502)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2511)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2514)
	at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:2625)
	at dotty.tools.dotc.typer.FrontEnd.liftedTree1$1(FrontEnd.scala:79)
	at dotty.tools.dotc.typer.FrontEnd.typeCheck$$anonfun$1(FrontEnd.scala:84)
	at dotty.runtime.function.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
	at dotty.tools.dotc.typer.FrontEnd.monitor(FrontEnd.scala:42)
	at dotty.tools.dotc.typer.FrontEnd.typeCheck(FrontEnd.scala:85)
	at dotty.tools.dotc.typer.FrontEnd.runOn$$anonfun$3(FrontEnd.scala:114)
	at dotty.runtime.function.JProcedure1.apply(JProcedure1.java:15)
	at dotty.runtime.function.JProcedure1.apply(JProcedure1.java:10)
	at scala.collection.immutable.List.foreach(List.scala:333)
	at dotty.tools.dotc.typer.FrontEnd.runOn(FrontEnd.scala:114)
	at dotty.tools.dotc.Run.runPhases$4$$anonfun$4(Run.scala:180)
	at dotty.runtime.function.JProcedure1.apply(JProcedure1.java:15)
	at dotty.runtime.function.JProcedure1.apply(JProcedure1.java:10)
	at scala.collection.ArrayOps$.foreach$extension(ArrayOps.scala:1323)
	at dotty.tools.dotc.Run.runPhases$5(Run.scala:190)
	at dotty.tools.dotc.Run.compileUnits$$anonfun$1(Run.scala:198)
	at dotty.runtime.function.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
	at dotty.tools.dotc.util.Stats$.maybeMonitored(Stats.scala:64)
	at dotty.tools.dotc.Run.compileUnits(Run.scala:205)
	at dotty.tools.dotc.Run.compileSources(Run.scala:142)
	at dotty.tools.dotc.Run.compile(Run.scala:124)
	at dotty.tools.dotc.Driver.doCompile(Driver.scala:38)
	at dotty.tools.dotc.Driver.process(Driver.scala:194)
	at dotty.tools.dotc.Driver.process(Driver.scala:163)
	at dotty.tools.dotc.Driver.process(Driver.scala:175)
	at dotty.tools.dotc.Driver.main(Driver.scala:202)
	at dotty.tools.dotc.Main.main(Main.scala)
@smarter smarter removed their assignment Jul 6, 2020
odersky added a commit to dotty-staging/dotty that referenced this issue Jul 8, 2020
@nicolasstucki nicolasstucki linked a pull request Jul 8, 2020 that will close this issue
odersky added a commit that referenced this issue Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants