Skip to content

Owner discrepancy when compiling from TASTY #3816

Closed
@nicolasstucki

Description

@nicolasstucki

Compiling the following minimization of tests/pos/NoCyclicReference.scala with -Ytest-pickler

trait Iterable { self =>
  type CC <: Iterable { type CC = self.CC }
}

fails with

> dotc -Ytest-pickler Test.scala
exception occurred while compiling tests/allan/Test.scala
Exception in thread "main" java.lang.AssertionError: assertion failed: Cyclic reference while unpickling definition at address 29 in unit null
	at dotty.DottyPredef$.assertFail(DottyPredef.scala:36)
	at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readIndexedDef(TreeUnpickler.scala:637)
	at dotty.tools.dotc.core.tasty.TreeUnpickler$Completer.complete(TreeUnpickler.scala:91)
	at dotty.tools.dotc.core.SymDenotations$SymDenotation.completeFrom(SymDenotations.scala:246)
	at dotty.tools.dotc.core.SymDenotations$SymDenotation.completeInfo$1(SymDenotations.scala:209)
	at dotty.tools.dotc.core.SymDenotations$SymDenotation.info(SymDenotations.scala:211)
	at dotty.tools.dotc.core.Denotations$SingleDenotation.computeAsSeenFrom(Denotations.scala:1070)
	at dotty.tools.dotc.core.Denotations$SingleDenotation.computeAsSeenFrom(Denotations.scala:1063)
	at dotty.tools.dotc.core.Denotations$PreDenotation.asSeenFrom(Denotations.scala:131)
	at dotty.tools.dotc.core.SymDenotations$ClassDenotation.findMember(SymDenotations.scala:1599)
	at dotty.tools.dotc.core.Types$Type.go$1(Types.scala:514)
	at dotty.tools.dotc.core.Types$Type.goAnd$1(Types.scala:646)
	at dotty.tools.dotc.core.Types$Type.go$1(Types.scala:532)
	at dotty.tools.dotc.core.Types$Type.goThis$1(Types.scala:615)
	at dotty.tools.dotc.core.Types$Type.go$1(Types.scala:518)
	at dotty.tools.dotc.core.Types$Type.findMember(Types.scala:658)
	at dotty.tools.dotc.core.Types$Type.memberExcluding(Types.scala:497)
	at dotty.tools.dotc.core.Types$Type.member(Types.scala:482)
	at dotty.tools.dotc.core.tasty.TreeUnpickler.accessibleDenot$1(TreeUnpickler.scala:906)
	at dotty.tools.dotc.core.tasty.TreeUnpickler.dotty$tools$dotc$core$tasty$TreeUnpickler$TreeReader$$_$readSimpleTerm$1$$anonfun$1(TreeUnpickler.scala:927)
	at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.completeSelect$1(TreeUnpickler.scala:897)
	at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readSimpleTerm$1(TreeUnpickler.scala:927)
	at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readTerm(TreeUnpickler.scala:1051)
	at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readTpt(TreeUnpickler.scala:1058)
	at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readNewDef(TreeUnpickler.scala:719)
	at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readIndexedDef(TreeUnpickler.scala:643)
	at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readIndexedStat(TreeUnpickler.scala:823)
	at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readIndexedStats$$anonfun$1(TreeUnpickler.scala:861)
	at dotty.tools.dotc.core.tasty.TastyReader.until(TastyReader.scala:125)
	at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readIndexedStats(TreeUnpickler.scala:861)
	at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readStats(TreeUnpickler.scala:865)
	at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readLengthTerm$1(TreeUnpickler.scala:1018)
	at dotty.tools.dotc.core.tasty.TreeUnpickler$TreeReader.readTerm(TreeUnpickler.scala:1051)
...

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions