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 e2b212d commit 8644b4bCopy full SHA for 8644b4b
compiler/src/dotty/tools/dotc/core/ConstraintHandling.scala
@@ -102,8 +102,10 @@ trait ConstraintHandling {
102
val dropWildcards = new ApproximatingTypeMap:
103
if !isUpper then variance = -1
104
def apply(t: Type): Type = t match
105
- case WildcardType if !allowWildcards =>
106
- range(param.underlying.loBound, param.underlying.hiBound)
+ case t: WildcardType if !allowWildcards =>
+ t.optBounds match
107
+ case TypeBounds(lo, hi) => range(lo, hi)
108
+ case _ => range(defn.NothingType, defn.AnyType)
109
case _ =>
110
mapOver(t)
111
// Narrow one of the bounds of type parameter `param`
0 commit comments