You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
checking ./Test.class after phase frontend
exception while typing [a,b : GenericCompanion2[[X0] => Bar[X0] | Baz[X0]]] of class class dotty.tools.dotc.ast.Trees$SeqLiteral # 140
exception while typing [a,b : GenericCompanion2[[X0] => Bar[X0] | Baz[X0]]]:
GenericCompanion2[[X0] => Bar[X0] | Baz[X0]]* of class class dotty.tools.dotc.ast.Trees$Typed # 142
exception while typing List.apply[GenericCompanion2[[X0] => Bar[X0] | Baz[X0]]](
[a,b : GenericCompanion2[[X0] => Bar[X0] | Baz[X0]]]:
GenericCompanion2[[X0] => Bar[X0] | Baz[X0]]*
) of class class dotty.tools.dotc.ast.Trees$Apply # 143
exception while typing {
List.apply[GenericCompanion2[[X0] => Bar[X0] | Baz[X0]]](
[a,b : GenericCompanion2[[X0] => Bar[X0] | Baz[X0]]]:
GenericCompanion2[[X0] => Bar[X0] | Baz[X0]]*
)
()
} of class class dotty.tools.dotc.ast.Trees$Block # 145
exception while typing {
val a: GenericCompanion2[Bar] = null
val b: GenericCompanion2[Baz] = null
{
List.apply[GenericCompanion2[[X0] => Bar[X0] | Baz[X0]]](
[a,b : GenericCompanion2[[X0] => Bar[X0] | Baz[X0]]]:
GenericCompanion2[[X0] => Bar[X0] | Baz[X0]]*
)
()
}
} of class class dotty.tools.dotc.ast.Trees$Block # 146
exception while typing def foo: Unit =
{
val a: GenericCompanion2[Bar] = null
val b: GenericCompanion2[Baz] = null
{
List.apply[GenericCompanion2[[X0] => Bar[X0] | Baz[X0]]](
[a,b : GenericCompanion2[[X0] => Bar[X0] | Baz[X0]]]:
GenericCompanion2[[X0] => Bar[X0] | Baz[X0]]*
)
()
}
} of class class dotty.tools.dotc.ast.Trees$DefDef # 33
exception while typing @scala.annotation.internal.SourceFile("tests/pos/hklub0.scala") final module
class
Test () extends Object() { this: Test.type =>
def foo: Unit =
{
val a: GenericCompanion2[Bar] = null
val b: GenericCompanion2[Baz] = null
{
List.apply[GenericCompanion2[[X0] => Bar[X0] | Baz[X0]]](
[a,b : GenericCompanion2[[X0] => Bar[X0] | Baz[X0]]]:
GenericCompanion2[[X0] => Bar[X0] | Baz[X0]]*
)
()
}
}
} of class class dotty.tools.dotc.ast.Trees$TypeDef # 20
exception while typing package <empty> {
final lazy module val Test: Test = new Test()
@scala.annotation.internal.SourceFile("tests/pos/hklub0.scala") final module
class
Test () extends Object() { this: Test.type =>
def foo: Unit =
{
val a: GenericCompanion2[Bar] = null
val b: GenericCompanion2[Baz] = null
{
List.apply[GenericCompanion2[[X0] => Bar[X0] | Baz[X0]]](
[a,b : GenericCompanion2[[X0] => Bar[X0] | Baz[X0]]]:
GenericCompanion2[[X0] => Bar[X0] | Baz[X0]]*
)
()
}
}
}
} of class class dotty.tools.dotc.ast.Trees$PackageDef # 27
*** error while checking ./Test.class after phase frontend ***
Exception in thread "main" java.lang.AssertionError: assertion failed: orphan param: X0, hash of binder = 159475521, tree = <empty>, type = AppliedType(TypeRef(ThisType(TypeRef(ThisType(TypeRef(NoPrefix,module class <root>)),<empty>)),GenericCompanion2),List(HKTypeLambda(List(X0), List(TypeBounds(TypeRef(TermRef(ThisType(TypeRef(NoPrefix,module class <root>)),scala),Nothing),TypeRef(TermRef(ThisType(TypeRef(NoPrefix,module class <root>)),scala),Any))), OrType(AppliedType(TypeRef(ThisType(TypeRef(ThisType(TypeRef(NoPrefix,module class <root>)),<empty>)),Bar),List(TypeParamRef(X0))),AppliedType(TypeRef(ThisType(TypeRef(ThisType(TypeRef(NoPrefix,module class <root>)),<empty>)),Baz),List(TypeParamRef(X0)))))))
at scala.Predef$.assert(Predef.scala:219)
at dotty.tools.dotc.transform.TreeChecker$$anon$1.apply(TreeChecker.scala:488)
at dotty.tools.dotc.core.Types$TypeMap.$anonfun$mapOver$6(Types.scala:3864)
at dotty.tools.dotc.core.Types$VariantTraversal.atVariance(Types.scala:3786)
at dotty.tools.dotc.core.Types$TypeMap.mapArgs$1(Types.scala:3864)
at dotty.tools.dotc.core.Types$TypeMap.mapOver(Types.scala:3872)
at dotty.tools.dotc.transform.TreeChecker$$anon$1.apply(TreeChecker.scala:492)
at dotty.tools.dotc.core.Types$TypeMap.mapOver(Types.scala:3918)
at dotty.tools.dotc.transform.TreeChecker$$anon$1.apply(TreeChecker.scala:492)
at dotty.tools.dotc.core.Types$TypeMap.mapOverLambda$1(Types.scala:3901)
at dotty.tools.dotc.core.Types$TypeMap.mapOver(Types.scala:3903)
at dotty.tools.dotc.transform.TreeChecker$$anon$1.apply(TreeChecker.scala:485)
at dotty.tools.dotc.core.Types$TypeMap.$anonfun$mapOver$6(Types.scala:3864)
at dotty.tools.dotc.core.Types$VariantTraversal.atVariance(Types.scala:3786)
at dotty.tools.dotc.core.Types$TypeMap.mapArgs$1(Types.scala:3864)
at dotty.tools.dotc.core.Types$TypeMap.mapOver(Types.scala:3872)
at dotty.tools.dotc.transform.TreeChecker$$anon$1.apply(TreeChecker.scala:492)
at dotty.tools.dotc.transform.TreeChecker$.checkNoOrphans(TreeChecker.scala:496)
at dotty.tools.dotc.transform.TreeChecker$Checker.typedUnadapted(TreeChecker.scala:288)
at dotty.tools.dotc.typer.Typer.$anonfun$typed$2(Typer.scala:1744)
at dotty.tools.dotc.reporting.trace$.apply(trace.scala:23)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1740)
at dotty.tools.dotc.transform.TreeChecker$Checker.typed(TreeChecker.scala:257)
at dotty.tools.dotc.typer.Typer.$anonfun$typedSeqLiteral$1(Typer.scala:1088)
at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
at dotty.tools.dotc.typer.Typer.typedSeqLiteral(Typer.scala:1075)
at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:1696)
at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1727)
at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:94)
at dotty.tools.dotc.transform.TreeChecker$Checker.typedUnadapted(TreeChecker.scala:272)
at dotty.tools.dotc.typer.Typer.$anonfun$typed$2(Typer.scala:1744)
at dotty.tools.dotc.reporting.trace$.apply(trace.scala:23)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1740)
at dotty.tools.dotc.transform.TreeChecker$Checker.typed(TreeChecker.scala:257)
at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:1801)
at dotty.tools.dotc.typer.Typer.$anonfun$typedTyped$3(Typer.scala:525)
at dotty.tools.dotc.typer.Typer.cases$1(Typer.scala:509)
at dotty.tools.dotc.typer.Typer.$anonfun$typedTyped$1(Typer.scala:523)
...
The text was updated successfully, but these errors were encountered:
Since recursive types register themselves, we should test the registry before
building them again. Otherwise, a repeated read (for whatever reason) will
install a new recursive type, but then any nested SHARED node of a reference
to the binder will pick up the reference to the old type.
Fail to compile from TASTY
Can be reproduced with
The text was updated successfully, but these errors were encountered: