File tree Expand file tree Collapse file tree 4 files changed +18
-4
lines changed
compiler/src/dotty/tools/dotc/core/classfile
tests/pos-java-interop-separate/i10225 Expand file tree Collapse file tree 4 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -461,11 +461,17 @@ class ClassfileParser(
461
461
val ts = new ListBuffer [Type ]
462
462
while (sig(index) == ':' ) {
463
463
index += 1
464
- if (sig(index) != ':' ) // guard against empty class bound
465
- ts += sig2type(tparams, skiptvs)
464
+ if (sig(index) != ':' ) { // guard against empty class bound
465
+ val tp = sig2type(tparams, skiptvs)
466
+ if (! skiptvs)
467
+ ts += cook(tp)
468
+ }
469
+ }
470
+ if (! skiptvs) {
471
+ val bound = if ts.isEmpty then defn.AnyType else ts.reduceLeft(AndType .apply)
472
+ TypeBounds .upper(bound)
466
473
}
467
- val bound = if ts.isEmpty then defn.AnyType else ts.reduceLeft(AndType .apply)
468
- TypeBounds .upper(bound)
474
+ else NoType
469
475
}
470
476
471
477
var tparams = classTParams
Original file line number Diff line number Diff line change
1
+ class A_1 <T > {}
Original file line number Diff line number Diff line change
1
+ class B_1 <S extends A_1 > {
2
+ public B_1 (S s ) { }
3
+ }
Original file line number Diff line number Diff line change
1
+ object Test {
2
+ val a = new A_1 [String ]
3
+ val b = new B_1 (a)
4
+ }
You can’t perform that action at this time.
0 commit comments