@@ -5171,20 +5171,19 @@ object Types extends TypeUtils {
5171
5171
record(" MatchType.reduce computed" )
5172
5172
if (myReduced != null ) record(" MatchType.reduce cache miss" )
5173
5173
if ! isUpToDate then setReductionContext()
5174
- myReduced =
5175
- trace(i " reduce match type $this $hashCode" , matchTypes, show = true ):
5174
+ val saved = ctx.typerState.snapshot()
5175
+ try
5176
+ myReduced = trace(i " reduce match type $this $hashCode" , matchTypes, show = true ):
5176
5177
withMode(Mode .Type ):
5177
5178
TypeComparer .reduceMatchWith: cmp =>
5178
- val saved = ctx.typerState.snapshot()
5179
- try
5180
- cmp.matchCases(scrutinee.normalized, cases.map(MatchTypeCaseSpec .analyze))
5181
- catch case ex : Throwable =>
5182
- myReduced = NoType
5183
- handleRecursive(" reduce type " , i " $scrutinee match ... " , ex)
5184
- finally
5185
- ctx.typerState.resetTo(saved)
5186
- // this drops caseLambdas in constraint and undoes any typevar
5187
- // instantiations during matchtype reduction
5179
+ cmp.matchCases(scrutinee.normalized, cases.map(MatchTypeCaseSpec .analyze))
5180
+ catch case ex : Throwable =>
5181
+ myReduced = NoType
5182
+ handleRecursive(" reduce type " , i " $scrutinee match ... " , ex)
5183
+ finally
5184
+ ctx.typerState.resetTo(saved)
5185
+ // this drops caseLambdas in constraint and undoes any typevar
5186
+ // instantiations during matchtype reduction
5188
5187
5189
5188
// else println(i"no change for $this $hashCode / $myReduced")
5190
5189
myReduced.nn
0 commit comments