Fix for #24552 (see testcase T24552)
Fixes for a bug in desugaring pattern synonyms matches, introduced while working on on expanding `do`-blocks in #18324 The `matchWrapper` unecessarily (and incorrectly) filtered out the default wild patterns in a match. Now the wild pattern alternative is simply ignored by the pm check as its origin is `Generated`. The current code now matches the expected semantics according to the language spec.
Showing
- compiler/GHC/HsToCore/Match.hs 4 additions, 21 deletionscompiler/GHC/HsToCore/Match.hs
- compiler/GHC/Tc/Gen/Do.hs 33 additions, 16 deletionscompiler/GHC/Tc/Gen/Do.hs
- testsuite/tests/patsyn/should_run/T24552.hs 14 additions, 0 deletionstestsuite/tests/patsyn/should_run/T24552.hs
- testsuite/tests/patsyn/should_run/T24552.stdout 1 addition, 0 deletionstestsuite/tests/patsyn/should_run/T24552.stdout
- testsuite/tests/patsyn/should_run/all.T 1 addition, 0 deletionstestsuite/tests/patsyn/should_run/all.T
Loading
Please register or sign in to comment