Fix #16411 by making dataConCannotMatch aware of (~~)
The `dataConCannotMatch` function (which powers the `-Wpartial-fields` warning, among other things) had special reasoning for explicit equality constraints of the form `a ~ b`, but it did not extend that reasoning to `a ~~ b` constraints, leading to #16411. Easily fixed.
Showing
- compiler/basicTypes/DataCon.hs 7 additions, 4 deletionscompiler/basicTypes/DataCon.hs
- testsuite/tests/typecheck/should_compile/T16411.hs 14 additions, 0 deletionstestsuite/tests/typecheck/should_compile/T16411.hs
- 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