Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/typer/Namer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1153,7 +1153,7 @@ class Namer { typer: Typer =>
case _ =>
WildcardType
}
paramFn(typedAheadType(mdef.tpt, tptProto).tpe)
paramFn(checkSimpleKinded(typedAheadType(mdef.tpt, tptProto)).tpe)
}

/** The type signature of a DefDef with given symbol */
Expand Down
14 changes: 14 additions & 0 deletions tests/neg/i4653.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
trait T {
type S
}

class C {
class D[X](val t: T) {
def bar: t.S = ???
}

def fooD: D = ??? // error
fooD.bar

def f(fooV: => D): Any = fooV.bar // error
}