File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -1167,13 +1167,23 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
1167
1167
else
1168
1168
fallback(tycon2bounds.lo)
1169
1169
1170
+ def compareTyConGadtBounds : Boolean =
1171
+ tycon2 match
1172
+ case tycon2 : TypeRef =>
1173
+ val tycon2sym = tycon2.symbol
1174
+ tycon2sym.onGadtBounds { bounds2 =>
1175
+ compareLower(bounds2, tyconIsTypeRef = false )
1176
+ }
1177
+ case _ => false
1178
+
1170
1179
tycon2 match {
1171
1180
case param2 : TypeParamRef =>
1172
1181
isMatchingApply(tp1) ||
1173
1182
canConstrain(param2) && canInstantiate(param2) ||
1174
1183
compareLower(bounds(param2), tyconIsTypeRef = false )
1175
1184
case tycon2 : TypeRef =>
1176
1185
isMatchingApply(tp1) ||
1186
+ compareTyConGadtBounds ||
1177
1187
defn.isCompiletimeAppliedType(tycon2.symbol) && compareCompiletimeAppliedType(tp2, tp1, fromBelow = true ) || {
1178
1188
tycon2.info match {
1179
1189
case info2 : TypeBounds =>
You can’t perform that action at this time.
0 commit comments