We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 74d81ab commit c58b23fCopy full SHA for c58b23f
compiler/src/dotty/tools/dotc/core/ConstraintHandling.scala
@@ -109,10 +109,12 @@ trait ConstraintHandling[AbstractContext] {
109
val p2 = adjust(tp.tp2)
110
if p1.exists && p2.exists then tp.derivedAndOrType(p1, p2) else NoType
111
case tp: TypeParamRef =>
112
+ if constraint.contains(tp) then
113
+ constr.println(i"${if tp eq param then "stripping" else "keeping"} $tp from $rawBound, upper = $isUpper in $constraint")
114
if tp eq param then // (1)
- //println(i"stripping $tp from $rawBound, upper = $isUpper in $constraint")
115
if isUpper then defn.AnyType else defn.NothingType
116
else constraint.entry(tp) match // (3)
117
+ case NoType => tp
118
case TypeBounds(lo, hi) => if lo eq hi then adjust(lo) else tp
119
case inst => adjust(inst)
120
case tp: TypeVar => // (2)
0 commit comments