File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -193,12 +193,7 @@ final class ProperGadtConstraint private(
193
193
case null => null
194
194
// TODO: Improve flow typing so that ascription becomes redundant
195
195
case tv : TypeVar =>
196
- def retrieveBounds : TypeBounds =
197
- bounds(tv.origin) match {
198
- case TypeAlias (tpr : TypeParamRef ) if reverseMapping.contains(tpr) =>
199
- TypeAlias (reverseMapping(tpr).nn.typeRef)
200
- case tb => tb
201
- }
196
+ def retrieveBounds : TypeBounds = externalize(bounds(tv.origin)).bounds
202
197
retrieveBounds
203
198
// .showing(i"gadt bounds $sym: $result", gadts)
204
199
// .ensuring(containsNoInternalTypes(_))
@@ -268,6 +263,7 @@ final class ProperGadtConstraint private(
268
263
case param : TypeParamRef => reverseMapping(param) match
269
264
case sym : Symbol => sym.typeRef
270
265
case null => param
266
+ case tp : TypeAlias => tp.derivedAlias(externalize(tp.alias, theMap))
271
267
case tp => (if theMap == null then ExternalizeMap () else theMap).mapOver(tp)
272
268
273
269
private class ExternalizeMap (using Context ) extends TypeMap :
You can’t perform that action at this time.
0 commit comments