Correctly report SrcLoc of redundant constraints
We were accidentally dropping the source location information in certain circumstances when reporting redundant constraints. This patch makes sure that we set the TcLclEnv correctly before reporting the warning. Fixes #21315
Showing
- compiler/GHC/Tc/Errors.hs 12 additions, 7 deletionscompiler/GHC/Tc/Errors.hs
- compiler/GHC/Tc/Errors/Types.hs 8 additions, 1 deletioncompiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Utils/Monad.hs 1 addition, 1 deletioncompiler/GHC/Tc/Utils/Monad.hs
- testsuite/tests/typecheck/should_compile/T21315.hs 6 additions, 0 deletionstestsuite/tests/typecheck/should_compile/T21315.hs
- testsuite/tests/typecheck/should_compile/T21315.stderr 4 additions, 0 deletionstestsuite/tests/typecheck/should_compile/T21315.stderr
- testsuite/tests/typecheck/should_compile/all.T 1 addition, 0 deletionstestsuite/tests/typecheck/should_compile/all.T
Loading
Please register or sign in to comment