Skip to content

Commit 4e4c212

Browse files
committed
format and cleanup
1 parent de25306 commit 4e4c212

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

compiler/src/dotty/tools/dotc/core/GadtConstraint.scala

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -728,9 +728,10 @@ final class ProperGadtConstraint private(
728728
private def externalize(tp: Type, theMap: TypeMap | Null = null)(using Context): Type = tp match
729729
case param: TypeParamRef => reverseMapping(param) match
730730
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
734735
case tp: TypeAlias => tp.derivedAlias(externalize(tp.alias, theMap))
735736
case tp => (if theMap == null then ExternalizeMap() else theMap).mapOver(tp)
736737

@@ -747,10 +748,6 @@ final class ProperGadtConstraint private(
747748
private def tvarOrError(ntp: NamedType)(using Context): TypeVar =
748749
tvarOf(ntp).ensuring(_ != null, i"not a constrainable type: $ntp").uncheckedNN
749750

750-
// private def containsNoInternalTypes(
751-
// tp: Type,
752-
// acc: TypeAccumulator[Boolean] | Null = null
753-
// )(using Context): Boolean = tp match {
754751
private def containsNoInternalTypes(tp: Type, theAcc: TypeAccumulator[Boolean] | Null = null)(using Context): Boolean = tp match {
755752
case tpr: TypeParamRef => !reverseMapping.contains(tpr)
756753
case tv: TypeVar => !reverseMapping.contains(tv.origin)

0 commit comments

Comments
 (0)