summaryrefslogtreecommitdiff
path: root/testsuite/tests/rename
diff options
context:
space:
mode:
authorShayne Fletcher <shayne@shaynefletcher.org>2021-04-24 16:59:26 -0400
committerShayne Fletcher <shayne@shaynefletcher.org>2021-05-23 08:02:58 +1000
commit0b1eed74e8ad5194152ed656ac3e4a547726b70a (patch)
tree3e654267d7077050a2358910ebe0ef29cfdddb0d /testsuite/tests/rename
parentef4d2999a200f22c864d7c1a2bdfbfd726a0f849 (diff)
downloadhaskell-0b1eed74e8ad5194152ed656ac3e4a547726b70a.tar.gz
Change representation of field selector occurences
- Change the names of the fields in in `data FieldOcc` - Renames `HsRecFld` to `HsRecSel` - Replace `AmbiguousFieldOcc p` in `HsRecSel` with `FieldOcc p` - Contains a haddock submodule update The primary motivation of this change is to remove `AmbiguousFieldOcc`. This is one of a suite of changes improving how record syntax (most notably record update syntax) is represented in the AST.
Diffstat (limited to 'testsuite/tests/rename')
-rw-r--r--testsuite/tests/rename/should_compile/T11167_ambig.stderr11
-rw-r--r--testsuite/tests/rename/should_compile/all.T1
-rw-r--r--testsuite/tests/rename/should_fail/T11167_ambig.hs (renamed from testsuite/tests/rename/should_compile/T11167_ambig.hs)0
-rw-r--r--testsuite/tests/rename/should_fail/T11167_ambig.stderr12
-rw-r--r--testsuite/tests/rename/should_fail/all.T1
5 files changed, 13 insertions, 12 deletions
diff --git a/testsuite/tests/rename/should_compile/T11167_ambig.stderr b/testsuite/tests/rename/should_compile/T11167_ambig.stderr
deleted file mode 100644
index 5320b42149..0000000000
--- a/testsuite/tests/rename/should_compile/T11167_ambig.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-
-T11167_ambig.hs:10:13: warning: [-Wambiguous-fields (in -Wdefault)]
- The field ‘runContT’ belonging to type ContT r m a is ambiguous.
- This will not be supported by -XDuplicateRecordFields in future releases of GHC.
- You can use explicit case analysis to resolve the ambiguity.
-
-T11167_ambig.hs:17:9: warning: [-Wambiguous-fields (in -Wdefault)]
- The field ‘runContT’ belonging to type forall a.
- ContT () IO a is ambiguous.
- This will not be supported by -XDuplicateRecordFields in future releases of GHC.
- You can use explicit case analysis to resolve the ambiguity.
diff --git a/testsuite/tests/rename/should_compile/all.T b/testsuite/tests/rename/should_compile/all.T
index 92464ca55b..56521084d7 100644
--- a/testsuite/tests/rename/should_compile/all.T
+++ b/testsuite/tests/rename/should_compile/all.T
@@ -145,7 +145,6 @@ test('T9778', normal, compile, ['-fwarn-unticked-promoted-constructors'])
test('T10816', normal, compile, [''])
test('T11164', [], multimod_compile, ['T11164', '-v0'])
test('T11167', normal, compile, [''])
-test('T11167_ambig', normal, compile, [''])
test('T10625', normal, compile, [''])
test('T11624', [], multimod_compile, ['T11624', ''])
test('T11662', [], multimod_compile, ['T11662', '-v0'])
diff --git a/testsuite/tests/rename/should_compile/T11167_ambig.hs b/testsuite/tests/rename/should_fail/T11167_ambig.hs
index 74df05e5ee..74df05e5ee 100644
--- a/testsuite/tests/rename/should_compile/T11167_ambig.hs
+++ b/testsuite/tests/rename/should_fail/T11167_ambig.hs
diff --git a/testsuite/tests/rename/should_fail/T11167_ambig.stderr b/testsuite/tests/rename/should_fail/T11167_ambig.stderr
new file mode 100644
index 0000000000..bf1029b81d
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T11167_ambig.stderr
@@ -0,0 +1,12 @@
+
+ T11167_ambig.hs:10:13:
+ Ambiguous occurrence ‘runContT’
+ It could refer to
+ either the field ‘runContT’, defined at T11167_ambig.hs:7:32
+ or the field ‘runContT’, defined at T11167_ambig.hs:6:30
+
+ T11167_ambig.hs:17:9:
+ Ambiguous occurrence ‘runContT’
+ It could refer to
+ either the field ‘runContT’, defined at T11167_ambig.hs:7:32
+ or the field ‘runContT’, defined at T11167_ambig.hs:6:30
diff --git a/testsuite/tests/rename/should_fail/all.T b/testsuite/tests/rename/should_fail/all.T
index d709fd0ad0..c25a7c3d92 100644
--- a/testsuite/tests/rename/should_fail/all.T
+++ b/testsuite/tests/rename/should_fail/all.T
@@ -178,3 +178,4 @@ test('T19843j', normal, compile_fail, [''])
test('T19843k', normal, compile_fail, [''])
test('T19843l', normal, compile_fail, [''])
test('T19843m', normal, compile_fail, [''])
+test('T11167_ambig', normal, compile_fail, [''])