Skip to content

Commit 7675ad2

Browse files
committed
Handle raw types in bounds of Java class type params
Fixes #10225.
1 parent 00b0a9c commit 7675ad2

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ class ClassfileParser(
464464
if (sig(index) != ':') { // guard against empty class bound
465465
val tp = sig2type(tparams, skiptvs)
466466
if (!skiptvs)
467-
ts += tp
467+
ts += cook(tp)
468468
}
469469
}
470470
if (!skiptvs) {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
class A_1<T> {}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
class B_1<S extends A_1> {
2+
public B_1(S s) { }
3+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
object Test {
2+
val a = new A_1[String]
3+
val b = new B_1(a)
4+
}

0 commit comments

Comments
 (0)