Skip to content

Commit 400ab3c

Browse files
committed
Fix #6451: Add missing case to AppliedType#lowerBound
1 parent d78b8c0 commit 400ab3c

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3556,6 +3556,8 @@ object Types {
35563556
else lo.applyIfParameterized(args)
35573557
case _ => NoType
35583558
}
3559+
case tycon: AppliedType =>
3560+
tycon.lowerBound.applyIfParameterized(args)
35593561
case _ =>
35603562
NoType
35613563
}

tests/pos/i6451.scala

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
object Test {
2+
3+
type YZ = [Y[_]] => [Z[_]] => [T] => Y[Z[T]]
4+
5+
val r1: List[List[Int]] = ???
6+
def r2(): List[List[Int]] = ???
7+
8+
val l1: YZ[List][List][Int] = r1
9+
val l2: YZ[List][List][Int] = r2()
10+
}

0 commit comments

Comments
 (0)