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(
193193 case null => null
194194 // TODO: Improve flow typing so that ascription becomes redundant
195195 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
202197 retrieveBounds
203198 // .showing(i"gadt bounds $sym: $result", gadts)
204199 // .ensuring(containsNoInternalTypes(_))
@@ -268,6 +263,7 @@ final class ProperGadtConstraint private(
268263 case param : TypeParamRef => reverseMapping(param) match
269264 case sym : Symbol => sym.typeRef
270265 case null => param
266+ case tp : TypeAlias => tp.derivedAlias(externalize(tp.alias, theMap))
271267 case tp => (if theMap == null then ExternalizeMap () else theMap).mapOver(tp)
272268
273269 private class ExternalizeMap (using Context ) extends TypeMap :
You can’t perform that action at this time.
0 commit comments