File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -728,9 +728,10 @@ final class ProperGadtConstraint private(
728
728
private def externalize (tp : Type , theMap : TypeMap | Null = null )(using Context ): Type = tp match
729
729
case param : TypeParamRef => reverseMapping(param) match
730
730
case sym : Symbol => sym.typeRef
731
- case null => pathDepReverseMapping(param) match
732
- case tp : TypeRef => tp
733
- case null => param
731
+ case null =>
732
+ pathDepReverseMapping(param) match
733
+ case tp : TypeRef => tp
734
+ case null => param
734
735
case tp : TypeAlias => tp.derivedAlias(externalize(tp.alias, theMap))
735
736
case tp => (if theMap == null then ExternalizeMap () else theMap).mapOver(tp)
736
737
@@ -747,10 +748,6 @@ final class ProperGadtConstraint private(
747
748
private def tvarOrError (ntp : NamedType )(using Context ): TypeVar =
748
749
tvarOf(ntp).ensuring(_ != null , i " not a constrainable type: $ntp" ).uncheckedNN
749
750
750
- // private def containsNoInternalTypes(
751
- // tp: Type,
752
- // acc: TypeAccumulator[Boolean] | Null = null
753
- // )(using Context): Boolean = tp match {
754
751
private def containsNoInternalTypes (tp : Type , theAcc : TypeAccumulator [Boolean ] | Null = null )(using Context ): Boolean = tp match {
755
752
case tpr : TypeParamRef => ! reverseMapping.contains(tpr)
756
753
case tv : TypeVar => ! reverseMapping.contains(tv.origin)
You can’t perform that action at this time.
0 commit comments