summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/overloadedrecflds/ghci/duplicaterecfldsghci01.stdout18
-rw-r--r--testsuite/tests/rename/should_fail/T15487.hs7
-rw-r--r--testsuite/tests/rename/should_fail/T15487.stderr8
-rw-r--r--testsuite/tests/rename/should_fail/T15487a.hs1
-rw-r--r--testsuite/tests/rename/should_fail/all.T2
-rw-r--r--testsuite/tests/rename/should_fail/rnfail044.stderr9
6 files changed, 32 insertions, 13 deletions
diff --git a/testsuite/tests/overloadedrecflds/ghci/duplicaterecfldsghci01.stdout b/testsuite/tests/overloadedrecflds/ghci/duplicaterecfldsghci01.stdout
index 3270089b9c..cfed45f6f1 100644
--- a/testsuite/tests/overloadedrecflds/ghci/duplicaterecfldsghci01.stdout
+++ b/testsuite/tests/overloadedrecflds/ghci/duplicaterecfldsghci01.stdout
@@ -6,21 +6,21 @@ data T a = MkT {Ghci2.foo :: Bool, ...}
<interactive>:1:1: error:
Ambiguous occurrence ‘foo’
- It could refer to either the field ‘foo’,
- defined at <interactive>:3:16
- or the field ‘foo’, defined at <interactive>:4:18
+ It could refer to
+ either the field ‘foo’, defined at <interactive>:3:16
+ or the field ‘foo’, defined at <interactive>:4:18
<interactive>:9:1: error:
Ambiguous occurrence ‘foo’
- It could refer to either the field ‘foo’,
- defined at <interactive>:3:16
- or the field ‘foo’, defined at <interactive>:4:18
+ It could refer to
+ either the field ‘foo’, defined at <interactive>:3:16
+ or the field ‘foo’, defined at <interactive>:4:18
True
<interactive>:1:1: error:
Ambiguous occurrence ‘foo’
- It could refer to either the field ‘foo’,
- defined at <interactive>:3:16
- or the field ‘foo’, defined at <interactive>:4:18
+ It could refer to
+ either the field ‘foo’, defined at <interactive>:3:16
+ or the field ‘foo’, defined at <interactive>:4:18
foo :: U -> Int
42
diff --git a/testsuite/tests/rename/should_fail/T15487.hs b/testsuite/tests/rename/should_fail/T15487.hs
new file mode 100644
index 0000000000..62e69e3805
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T15487.hs
@@ -0,0 +1,7 @@
+module T15487 where
+
+import qualified T15487a
+
+null = 42
+
+foo x = null
diff --git a/testsuite/tests/rename/should_fail/T15487.stderr b/testsuite/tests/rename/should_fail/T15487.stderr
new file mode 100644
index 0000000000..bb25939f4b
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T15487.stderr
@@ -0,0 +1,8 @@
+
+T15487.hs:7:9: error:
+ Ambiguous occurrence ‘null’
+ It could refer to
+ either ‘Prelude.null’,
+ imported from ‘Prelude’ at T15487.hs:1:8-13
+ (and originally defined in ‘Data.Foldable’)
+ or ‘T15487.null’, defined at T15487.hs:5:1
diff --git a/testsuite/tests/rename/should_fail/T15487a.hs b/testsuite/tests/rename/should_fail/T15487a.hs
new file mode 100644
index 0000000000..e8687eee44
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T15487a.hs
@@ -0,0 +1 @@
+module T15487a (null) where
diff --git a/testsuite/tests/rename/should_fail/all.T b/testsuite/tests/rename/should_fail/all.T
index 2eef29f1cc..c69efb9c66 100644
--- a/testsuite/tests/rename/should_fail/all.T
+++ b/testsuite/tests/rename/should_fail/all.T
@@ -133,3 +133,5 @@ test('T14307', normal, compile_fail, [''])
test('T14591', normal, compile_fail, [''])
test('T15214', normal, compile_fail, [''])
test('T15539', normal, compile_fail, [''])
+test('T15487', normal, multimod_compile_fail, ['T15487','-v0'])
+
diff --git a/testsuite/tests/rename/should_fail/rnfail044.stderr b/testsuite/tests/rename/should_fail/rnfail044.stderr
index 6dcf2ca8f9..39f7b77056 100644
--- a/testsuite/tests/rename/should_fail/rnfail044.stderr
+++ b/testsuite/tests/rename/should_fail/rnfail044.stderr
@@ -1,7 +1,8 @@
rnfail044.hs:5:12: error:
Ambiguous occurrence ‘splitAt’
- It could refer to either ‘Data.List.splitAt’,
- imported from ‘Prelude’ at rnfail044.hs:5:8
- (and originally defined in ‘GHC.List’)
- or ‘A.splitAt’, defined at rnfail044.hs:8:3
+ It could refer to
+ either ‘Prelude.splitAt’,
+ imported from ‘Prelude’ at rnfail044.hs:5:8
+ (and originally defined in ‘GHC.List’)
+ or ‘A.splitAt’, defined at rnfail044.hs:8:3