We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f3ea3ce commit 11cb7afCopy full SHA for 11cb7af
compiler/src/dotty/tools/dotc/core/TypeOps.scala
@@ -142,11 +142,8 @@ object TypeOps:
142
case defn.MatchCase(pat, body) =>
143
defn.MatchCase(simplify(pat, theMap), body)
144
case tp: AppliedType =>
145
- tp.tycon match
146
- case tycon: TypeRef if tp.isMatchAlias =>
147
- isFullyDefined(tp, ForceDegree.all)
148
- case _ =>
149
- val normed = tp.tryNormalize
+ if tp.isMatchAlias then isFullyDefined(tp, ForceDegree.all)
+ val normed = tp.tryNormalize.orElse(tp.tryCompiletimeConstantFold)
150
if normed.exists then simplify(normed, theMap) else tp.map(simplify(_, theMap))
151
case tp: TypeParamRef =>
152
val tvar = ctx.typerState.constraint.typeVarOfParam(tp)
0 commit comments