Skip to content

AssertionError: duplicate attachment for key #9287

Closed
@sir-wabbit

Description

@sir-wabbit

Minimized code

I haven't been able to minimize it further 😅

// AE-6eb7a8f351de78d430c7ca502335eb0845bdbf3f
object Foo {
  Nil {
    class i0 { a: i2 =>
      class i1
    }
  }
}

Output (click arrow to expand)

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@790a251b while compiling test.scala
Exception in thread "main" java.lang.AssertionError: assertion failed: duplicate attachment for key dotty.tools.dotc.util.Property$Key@790a251b
	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.record$1(Namer.scala:489)
	at dotty.tools.dotc.typer.Namer.expand(Namer.scala:492)
	at dotty.tools.dotc.typer.Namer.index$$anonfun$1(Namer.scala:773)
	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.Namer.index(Namer.scala:773)
	at dotty.tools.dotc.typer.Namer$ClassCompleter.completeConstructor(Namer.scala:1226)
	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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions