Fix panic when using pattern synonyms with DisambiguateRecordFields
This fixes a `find_tycon` panic when constructing a record pattern synonym when `DisambiguateRecordFields` (turned on by `RecordWildCards`) is enabled. The handling of record wild cards in such constructions isn't completely satisfactory, but doing better will require the `Parent` type to be more informative, as I'll explain on #11228. Test Plan: New test patsyn/should_compile/T11283.hs Reviewers: mpickering, austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1695 GHC Trac Issues: #11283
Showing
- compiler/rename/RnPat.hs 15 additions, 11 deletionscompiler/rename/RnPat.hs
- testsuite/tests/patsyn/should_compile/T11283.hs 7 additions, 0 deletionstestsuite/tests/patsyn/should_compile/T11283.hs
- testsuite/tests/patsyn/should_compile/T11283.stderr 5 additions, 0 deletionstestsuite/tests/patsyn/should_compile/T11283.stderr
- testsuite/tests/patsyn/should_compile/all.T 1 addition, 0 deletionstestsuite/tests/patsyn/should_compile/all.T
Loading
Please register or sign in to comment