Skip to content

Commit

Permalink
Restore local def tryMatchAlias for JIT purposes
Browse files Browse the repository at this point in the history
  • Loading branch information
EugeneFlesselle committed Apr 24, 2024
1 parent b521296 commit a0f2126
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion compiler/src/dotty/tools/dotc/core/Types.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4654,13 +4654,14 @@ object Types extends TypeUtils {
cachedUnderlyingMatch

override def tryNormalize(using Context): Type =
tryCompiletimeConstantFold.orElse:
def tryMatchAlias =
if isMatchAlias then trace(i"normalize $this", typr, show = true):
if MatchTypeTrace.isRecording then
MatchTypeTrace.recurseWith(this)(superType.tryNormalize)
else
underlyingMatchType.tryNormalize
else NoType
tryCompiletimeConstantFold.orElse(tryMatchAlias)

/** Is this an unreducible application to wildcard arguments?
* This is the case if tycon is higher-kinded. This means
Expand Down

0 comments on commit a0f2126

Please sign in to comment.