Skip to content

typer hang using type keyword on a class type param #78

Closed
@retronym

Description

@retronym
class B[type X] { def foo(x: X) = ??? }
"main" prio=5 tid=7fe537800800 nid=0x104197000 runnable [104191000]
   java.lang.Thread.State: RUNNABLE
    at dotty.tools.dotc.core.Types$Type.termSymbol(Types.scala:251)
    at dotty.tools.dotc.typer.Checking$class.checkValue(Checking.scala:42)
    at dotty.tools.dotc.typer.Typer.checkValue(Typer.scala:51)
    at dotty.tools.dotc.typer.Typer$$anonfun$typedIdent$1.apply(Typer.scala:263)
    at dotty.tools.dotc.typer.Typer$$anonfun$typedIdent$1.apply(Typer.scala:72)
    at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
    at dotty.tools.dotc.typer.Typer.typedIdent(Typer.scala:72)

The cycle:

(this, this.underlying(ctx), this.underlying(ctx).underlying(ctx), this.underlying(ctx).underlying(ctx).underlying(ctx))

_1 = {dotty.tools.dotc.core.Types$CachedTypeBounds@2600}"TypeAlias(TypeRef(ThisType(class B),X))"
_2 = {dotty.tools.dotc.core.Types$CachedTypeRef@2642}"TypeRef(ThisType(class B),X)"
_3 = {dotty.tools.dotc.core.Types$CachedTypeBounds@2600}"TypeAlias(TypeRef(ThisType(class B),X))"
_4 = {dotty.tools.dotc.core.Types$CachedTypeRef@2642}"TypeRef(ThisType(class B),X)"

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions