Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport "Streamline tryNormalize with underlyingMatchType" to LTS #21990

Closed
wants to merge 9 commits into from
Prev Previous commit
Next Next commit
Drop handleRecursive from MatchType#tryNormalize
There is already a `handleRecursive` in `reduced`
Having the two makes error messages undeterministic, see #20269

[Cherry-picked 309b1cf]
EugeneFlesselle authored and prolativ committed Nov 20, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit dc2d31bdddaeca24f497c533b2caef20ae1c13b2
6 changes: 1 addition & 5 deletions compiler/src/dotty/tools/dotc/core/Types.scala
Original file line number Diff line number Diff line change
@@ -4958,11 +4958,7 @@ object Types extends TypeUtils {
private var reductionContext: util.MutableMap[Type, Type] = _

override def tryNormalize(using Context): Type =
try
reduced.normalized
catch
case ex: Throwable =>
handleRecursive("normalizing", s"${scrutinee.show} match ..." , ex)
reduced.normalized

def reduced(using Context): Type = atPhaseNoLater(elimOpaquePhase) {