Valid hole fits: don't panic on a Given
The function GHC.Tc.Errors.validHoleFits would end up panicking when encountering a Given constraint. To fix this, it suffices to filter out the Givens before continuing. Fixes #22684 (cherry picked from commit 630e3026)
Showing
- compiler/GHC/Tc/Errors.hs 11 additions, 8 deletionscompiler/GHC/Tc/Errors.hs
- compiler/GHC/Tc/Errors/Types.hs 3 additions, 1 deletioncompiler/GHC/Tc/Errors/Types.hs
- testsuite/tests/typecheck/should_fail/T22684.hs 19 additions, 0 deletionstestsuite/tests/typecheck/should_fail/T22684.hs
- testsuite/tests/typecheck/should_fail/T22684.stderr 35 additions, 0 deletionstestsuite/tests/typecheck/should_fail/T22684.stderr
- testsuite/tests/typecheck/should_fail/all.T 1 addition, 0 deletionstestsuite/tests/typecheck/should_fail/all.T
Loading
Please register or sign in to comment