diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2016-10-01 17:55:04 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-10-01 20:01:29 -0400 |
commit | 2d6642bd1956edf8b842c07d78e83c500246998a (patch) | |
tree | c16292ebfe857bba54c65de413c260e576860a46 /testsuite/tests/patsyn/should_compile/T11987.hs | |
parent | c93813d96b1da53a2ebd9c9ac5af6cc3e3443c43 (diff) | |
download | haskell-2d6642bd1956edf8b842c07d78e83c500246998a.tar.gz |
Fix interaction of record pattern synonyms and record wildcards
We were missing an appropiate *ConLike lookup in the case when
the pattern synonym was defined in a different module.
Reviewers: austin, bgamari, simonpj
Reviewed By: simonpj
Subscribers: simonpj, thomie
Differential Revision: https://phabricator.haskell.org/D2544
GHC Trac Issues: #11987
Diffstat (limited to 'testsuite/tests/patsyn/should_compile/T11987.hs')
-rw-r--r-- | testsuite/tests/patsyn/should_compile/T11987.hs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/patsyn/should_compile/T11987.hs b/testsuite/tests/patsyn/should_compile/T11987.hs new file mode 100644 index 0000000000..eab3316b2a --- /dev/null +++ b/testsuite/tests/patsyn/should_compile/T11987.hs @@ -0,0 +1,12 @@ +{-# LANGUAGE NamedFieldPuns, PatternSynonyms, RecordWildCards #-} +module T11987 where + +import T11987a + +-- works +namedFieldPuns :: (Int,Int) +namedFieldPuns = let { x = 1; y = 2 } in Point { x, y } + +-- error: Pattern synonym ‘Point’ used as a data constructor +recordWildCards :: (Int,Int) +recordWildCards = let { x = 1; y = 2 } in Point { .. } |