Skip to content

Commit

Permalink
format and cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Linyxus committed Jul 22, 2022
1 parent f4d6a51 commit 37440e8
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions compiler/src/dotty/tools/dotc/core/GadtConstraint.scala
Original file line number Diff line number Diff line change
Expand Up @@ -728,9 +728,10 @@ final class ProperGadtConstraint private(
private def externalize(tp: Type, theMap: TypeMap | Null = null)(using Context): Type = tp match
case param: TypeParamRef => reverseMapping(param) match
case sym: Symbol => sym.typeRef
case null => pathDepReverseMapping(param) match
case tp: TypeRef => tp
case null => param
case null =>
pathDepReverseMapping(param) match
case tp: TypeRef => tp
case null => param
case tp: TypeAlias => tp.derivedAlias(externalize(tp.alias, theMap))
case tp => (if theMap == null then ExternalizeMap() else theMap).mapOver(tp)

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

// private def containsNoInternalTypes(
// tp: Type,
// acc: TypeAccumulator[Boolean] | Null = null
// )(using Context): Boolean = tp match {
private def containsNoInternalTypes(tp: Type, theAcc: TypeAccumulator[Boolean] | Null = null)(using Context): Boolean = tp match {
case tpr: TypeParamRef => !reverseMapping.contains(tpr)
case tv: TypeVar => !reverseMapping.contains(tv.origin)
Expand Down

0 comments on commit 37440e8

Please sign in to comment.