File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
compiler/src/dotty/tools/dotc/core/classfile Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -461,11 +461,17 @@ class ClassfileParser(
461461 val ts = new ListBuffer [Type ]
462462 while (sig(index) == ':' ) {
463463 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 += tp
468+ }
469+ }
470+ if (! skiptvs) {
471+ val bound = if ts.isEmpty then defn.AnyType else ts.reduceLeft(AndType .apply)
472+ TypeBounds .upper(bound)
466473 }
467- val bound = if ts.isEmpty then defn.AnyType else ts.reduceLeft(AndType .apply)
468- TypeBounds .upper(bound)
474+ else NoType
469475 }
470476
471477 var tparams = classTParams
You can’t perform that action at this time.
0 commit comments