@@ -4177,22 +4177,25 @@ object Types {
4177
4177
case nil => x
4178
4178
foldArgs(op(x, tycon), args)
4179
4179
4180
- override def tryNormalize (using Context ): Type = tycon.stripTypeVar match {
4181
- case tycon : TypeRef =>
4182
- def tryMatchAlias = tycon.info match {
4183
- case MatchAlias (alias) =>
4184
- trace(i " normalize $this" , typr, show = true ) {
4185
- MatchTypeTrace .recurseWith(this ) {
4186
- alias.applyIfParameterized(args.map(_.normalized)).tryNormalize
4187
- }
4188
- }
4180
+ var myTryNormalize : Type | Null = null
4181
+ var myTryNoramlizePeriod : Period = Nowhere
4182
+
4183
+ override def tryNormalize (using Context ): Type =
4184
+ if myTryNoramlizePeriod != ctx.period then
4185
+ myTryNormalize = tycon.stripTypeVar match
4186
+ case tycon : TypeRef =>
4187
+ def tryMatchAlias = tycon.info match
4188
+ case MatchAlias (alias) =>
4189
+ trace(i " normalize $this" , typr, show = true ) {
4190
+ MatchTypeTrace .recurseWith(this ) {
4191
+ alias.applyIfParameterized(args.map(_.normalized)).tryNormalize
4192
+ }
4193
+ }
4194
+ case _ => NoType
4195
+ tryCompiletimeConstantFold.orElse(tryMatchAlias)
4189
4196
case _ =>
4190
4197
NoType
4191
- }
4192
- tryCompiletimeConstantFold.orElse(tryMatchAlias)
4193
- case _ =>
4194
- NoType
4195
- }
4198
+ myTryNormalize.nn
4196
4199
4197
4200
/** Does this application expand to a match type? */
4198
4201
def isMatchAlias (using Context ): Boolean = tycon.stripTypeVar match
0 commit comments