Skip to content

Commit e3b4932

Browse files
committed
Fix #3433: Fix determining typeParams for structural type members
1 parent be50d2c commit e3b4932

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

compiler/src/dotty/tools/dotc/core/TypeApplications.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ class TypeApplications(val self: Type) extends AnyVal {
172172
case self: TypeRef =>
173173
val tsym = self.symbol
174174
if (tsym.isClass) tsym.typeParams
175+
else if (!tsym.exists) self.info.typeParams
175176
else if (!tsym.isCompleting) tsym.info.typeParams
176177
else Nil
177178
case self: AppliedType =>

tests/pos/i3433.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
object Test {
2+
type Const[t] = { type L[x] = t }
3+
type Bar[a] = Const[Int]#L[a]
4+
}

0 commit comments

Comments
 (0)