diff options
author | Adam Gundry <adam@well-typed.com> | 2018-06-15 14:11:22 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2018-06-15 14:11:39 -0400 |
commit | 7100850eebb1c1aec0aaabca08915bac8b90e188 (patch) | |
tree | f3c1928540b660af6f4691662e6a0cd144b5536c /testsuite/tests/rename/should_compile | |
parent | 9c89ef39f54943dd3fcd9d196ce1a5bdf7f5f94b (diff) | |
download | haskell-7100850eebb1c1aec0aaabca08915bac8b90e188.tar.gz |
Use data con name instead of parent in lookupRecFieldOcc
Test Plan: new tests rename/should_compile/{T14747,T15149}
Reviewers: simonpj, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie, carter
GHC Trac Issues: #14747, #15149
Differential Revision: https://phabricator.haskell.org/D4821
Diffstat (limited to 'testsuite/tests/rename/should_compile')
-rw-r--r-- | testsuite/tests/rename/should_compile/T14747.hs | 9 | ||||
-rw-r--r-- | testsuite/tests/rename/should_compile/T14747A.hs | 5 | ||||
-rw-r--r-- | testsuite/tests/rename/should_compile/T15149.hs | 5 | ||||
-rw-r--r-- | testsuite/tests/rename/should_compile/T15149A.hs | 4 | ||||
-rw-r--r-- | testsuite/tests/rename/should_compile/T15149B.hs | 4 | ||||
-rw-r--r-- | testsuite/tests/rename/should_compile/T15149C.hs | 4 | ||||
-rw-r--r-- | testsuite/tests/rename/should_compile/all.T | 2 |
7 files changed, 33 insertions, 0 deletions
diff --git a/testsuite/tests/rename/should_compile/T14747.hs b/testsuite/tests/rename/should_compile/T14747.hs new file mode 100644 index 0000000000..6dde0bdab9 --- /dev/null +++ b/testsuite/tests/rename/should_compile/T14747.hs @@ -0,0 +1,9 @@ +{-# LANGUAGE PatternSynonyms, DisambiguateRecordFields #-} + +module T14747 where + +import T14747A + +pattern T{x} = [x] + +e = S { x = 42 } diff --git a/testsuite/tests/rename/should_compile/T14747A.hs b/testsuite/tests/rename/should_compile/T14747A.hs new file mode 100644 index 0000000000..a3b6e604e4 --- /dev/null +++ b/testsuite/tests/rename/should_compile/T14747A.hs @@ -0,0 +1,5 @@ +{-# LANGUAGE PatternSynonyms #-} + +module T14747A where + +pattern S{x} = [x] diff --git a/testsuite/tests/rename/should_compile/T15149.hs b/testsuite/tests/rename/should_compile/T15149.hs new file mode 100644 index 0000000000..e2e77db9a1 --- /dev/null +++ b/testsuite/tests/rename/should_compile/T15149.hs @@ -0,0 +1,5 @@ +{-# LANGUAGE DisambiguateRecordFields #-} +module Main where +import T15149B +import T15149C +main = do print (AnDouble{an=1}, AnInt{an=1}) diff --git a/testsuite/tests/rename/should_compile/T15149A.hs b/testsuite/tests/rename/should_compile/T15149A.hs new file mode 100644 index 0000000000..09b9beb36f --- /dev/null +++ b/testsuite/tests/rename/should_compile/T15149A.hs @@ -0,0 +1,4 @@ +{-# LANGUAGE TypeFamilies #-} +module T15149A where + +data family An c :: * diff --git a/testsuite/tests/rename/should_compile/T15149B.hs b/testsuite/tests/rename/should_compile/T15149B.hs new file mode 100644 index 0000000000..9a9508da08 --- /dev/null +++ b/testsuite/tests/rename/should_compile/T15149B.hs @@ -0,0 +1,4 @@ +{-# LANGUAGE TypeFamilies #-} +module T15149B where +import T15149A +data instance An Int = AnInt {an :: Int} deriving Show diff --git a/testsuite/tests/rename/should_compile/T15149C.hs b/testsuite/tests/rename/should_compile/T15149C.hs new file mode 100644 index 0000000000..ca1a7f88fb --- /dev/null +++ b/testsuite/tests/rename/should_compile/T15149C.hs @@ -0,0 +1,4 @@ +{-# LANGUAGE TypeFamilies #-} +module T15149C where +import T15149A +data instance An Double = AnDouble {an :: Double} deriving Show diff --git a/testsuite/tests/rename/should_compile/all.T b/testsuite/tests/rename/should_compile/all.T index 1797c28854..7e31400715 100644 --- a/testsuite/tests/rename/should_compile/all.T +++ b/testsuite/tests/rename/should_compile/all.T @@ -154,3 +154,5 @@ test('T13132', normal, compile, ['']) test('T13646', normal, compile, ['']) test('LookupSub', [], multimod_compile, ['LookupSub', '-v0']) test('T14881', [], multimod_compile, ['T14881', '-W']) +test('T14747', [], multimod_compile, ['T14747', '-v0']) +test('T15149', [], multimod_compile, ['T15149', '-v0']) |