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(_))
@@ -260,6 +255,7 @@ final class ProperGadtConstraint private(
260
255
case param : TypeParamRef => reverseMapping(param) match
261
256
case sym : Symbol => sym.typeRef
262
257
case null => param
258
+ case tp : TypeAlias => tp.derivedAlias(externalize(tp.alias, theMap))
263
259
case tp => (if theMap == null then ExternalizeMap () else theMap).mapOver(tp)
264
260
265
261
private class ExternalizeMap (using Context ) extends TypeMap :
You can’t perform that action at this time.
0 commit comments