diff options
20 files changed, 120 insertions, 76 deletions
diff --git a/compiler/GHC/Rename/Utils.hs b/compiler/GHC/Rename/Utils.hs index 597af3d778..c6953e4ced 100644 --- a/compiler/GHC/Rename/Utils.hs +++ b/compiler/GHC/Rename/Utils.hs @@ -564,12 +564,15 @@ addNameClashErrRn rdr_name gres -- imported from ‘Prelude’ at T15487.hs:1:8-13 -- or ... -- See #15487 - pp_greMangledName gre@(GRE { gre_name = child + pp_greMangledName gre@(GRE { gre_name = child, gre_par = par , gre_lcl = lcl, gre_imp = iss }) = case child of - FieldGreName fl -> text "the field" <+> quotes (ppr fl) + FieldGreName fl -> text "the field" <+> quotes (ppr fl) <+> parent_info NormalGreName name -> quotes (pp_qual name <> dot <> ppr (nameOccName name)) where + parent_info = case par of + NoParent -> empty + ParentIs { par_is = par_name } -> text "of record" <+> quotes (ppr par_name) pp_qual name | lcl = ppr (nameModule name) diff --git a/testsuite/tests/overloadedrecflds/ghci/GHCiDRF.stdout b/testsuite/tests/overloadedrecflds/ghci/GHCiDRF.stdout index 1a7b44e64e..08406f9387 100644 --- a/testsuite/tests/overloadedrecflds/ghci/GHCiDRF.stdout +++ b/testsuite/tests/overloadedrecflds/ghci/GHCiDRF.stdout @@ -3,8 +3,8 @@ GHCiDRF.foo :: T -> Int <interactive>:1:1: error: Ambiguous occurrence ‘GHCiDRF.bar’ It could refer to - either the field ‘bar’, defined at GHCiDRF.hs:4:16 - or the field ‘bar’, defined at GHCiDRF.hs:3:28 + either the field ‘bar’ of record ‘U’, defined at GHCiDRF.hs:4:16 + or the field ‘bar’ of record ‘T’, defined at GHCiDRF.hs:3:28 type T :: * data T = MkT {foo :: Int, ...} -- Defined at GHCiDRF.hs:3:16 diff --git a/testsuite/tests/overloadedrecflds/should_fail/DRFUnused.stderr b/testsuite/tests/overloadedrecflds/should_fail/DRFUnused.stderr index 2043591329..e020e8cd82 100644 --- a/testsuite/tests/overloadedrecflds/should_fail/DRFUnused.stderr +++ b/testsuite/tests/overloadedrecflds/should_fail/DRFUnused.stderr @@ -1,7 +1,7 @@ -DRFUnused.hs:18:5: +DRFUnused.hs:18:5: error: Ambiguous occurrence ‘foo’ It could refer to - either the field ‘foo’, defined at DRFUnused.hs:12:16 - or the field ‘foo’, defined at DRFUnused.hs:11:16 - or the field ‘foo’, defined at DRFUnused.hs:10:16 + either the field ‘foo’ of record ‘U’, defined at DRFUnused.hs:12:16 + or the field ‘foo’ of record ‘T’, defined at DRFUnused.hs:11:16 + or the field ‘foo’ of record ‘S’, defined at DRFUnused.hs:10:16 diff --git a/testsuite/tests/overloadedrecflds/should_fail/NFSMixed.stderr b/testsuite/tests/overloadedrecflds/should_fail/NFSMixed.stderr index b569125c4a..0419feb764 100644 --- a/testsuite/tests/overloadedrecflds/should_fail/NFSMixed.stderr +++ b/testsuite/tests/overloadedrecflds/should_fail/NFSMixed.stderr @@ -2,10 +2,10 @@ NFSMixed.hs:5:18: error: Ambiguous occurrence ‘foo’ It could refer to - either the field ‘foo’, + either the field ‘foo’ of record ‘Foo’, imported from ‘NFSMixedA’ at NFSMixed.hs:3:1-16 (and originally defined at NFSMixedA.hs:4:18-20) - or the field ‘foo’, + or the field ‘foo’ of record ‘Bar’, imported from ‘NFSMixedA’ at NFSMixed.hs:3:1-16 (and originally defined at NFSMixedA.hs:5:18-20) or ‘NFSMixedA.foo’, diff --git a/testsuite/tests/overloadedrecflds/should_fail/NoFieldSelectorsFail.stderr b/testsuite/tests/overloadedrecflds/should_fail/NoFieldSelectorsFail.stderr index 13193f38d9..6810d549ff 100644 --- a/testsuite/tests/overloadedrecflds/should_fail/NoFieldSelectorsFail.stderr +++ b/testsuite/tests/overloadedrecflds/should_fail/NoFieldSelectorsFail.stderr @@ -2,37 +2,37 @@ NoFieldSelectorsFail.hs:9:14: error: Ambiguous occurrence ‘foo’ It could refer to - either the field ‘foo’, + either the field ‘foo’ of record ‘Foo’, imported from ‘NoFieldSelectorsFailA’ at NoFieldSelectorsFail.hs:4:1-28 (and originally defined at NoFieldSelectorsFailA.hs:5:18-20) - or the field ‘foo’, + or the field ‘foo’ of record ‘Bar’, imported from ‘NoFieldSelectorsFailA’ at NoFieldSelectorsFail.hs:4:1-28 (and originally defined at NoFieldSelectorsFailA.hs:6:18-20) NoFieldSelectorsFail.hs:12:15: error: Ambiguous occurrence ‘foo’ It could refer to - either the field ‘foo’, + either the field ‘foo’ of record ‘Foo’, imported from ‘NoFieldSelectorsFailA’ at NoFieldSelectorsFail.hs:4:1-28 (and originally defined at NoFieldSelectorsFailA.hs:5:18-20) - or the field ‘foo’, + or the field ‘foo’ of record ‘Bar’, imported from ‘NoFieldSelectorsFailA’ at NoFieldSelectorsFail.hs:4:1-28 (and originally defined at NoFieldSelectorsFailA.hs:6:18-20) NoFieldSelectorsFail.hs:14:15: error: Ambiguous occurrence ‘foo’ It could refer to - either the field ‘foo’, + either the field ‘foo’ of record ‘Foo’, imported from ‘NoFieldSelectorsFailA’ at NoFieldSelectorsFail.hs:4:1-28 (and originally defined at NoFieldSelectorsFailA.hs:5:18-20) - or the field ‘foo’, + or the field ‘foo’ of record ‘Bar’, imported from ‘NoFieldSelectorsFailA’ at NoFieldSelectorsFail.hs:4:1-28 (and originally defined at NoFieldSelectorsFailA.hs:6:18-20) NoFieldSelectorsFail.hs:16:15: error: Ambiguous occurrence ‘bar’ It could refer to - either the field ‘bar’, + either the field ‘bar’ of record ‘Foo’, imported from ‘NoFieldSelectorsFailA’ at NoFieldSelectorsFail.hs:4:1-28 (and originally defined at NoFieldSelectorsFailA.hs:5:30-32) or ‘NoFieldSelectorsFailA.bar’, diff --git a/testsuite/tests/overloadedrecflds/should_fail/T11103.stderr b/testsuite/tests/overloadedrecflds/should_fail/T11103.stderr index 09606e0557..076d067d36 100644 --- a/testsuite/tests/overloadedrecflds/should_fail/T11103.stderr +++ b/testsuite/tests/overloadedrecflds/should_fail/T11103.stderr @@ -2,5 +2,5 @@ T11103.hs:13:2: error: Ambiguous occurrence ‘Main.foo’ It could refer to - either the field ‘foo’, defined at T11103.hs:11:16 - or the field ‘foo’, defined at T11103.hs:10:16 + either the field ‘foo’ of record ‘S’, defined at T11103.hs:11:16 + or the field ‘foo’ of record ‘R’, defined at T11103.hs:10:16 diff --git a/testsuite/tests/overloadedrecflds/should_fail/T11167_ambiguous_fixity.stderr b/testsuite/tests/overloadedrecflds/should_fail/T11167_ambiguous_fixity.stderr index 7dd2913739..709ee2312d 100644 --- a/testsuite/tests/overloadedrecflds/should_fail/T11167_ambiguous_fixity.stderr +++ b/testsuite/tests/overloadedrecflds/should_fail/T11167_ambiguous_fixity.stderr @@ -2,15 +2,15 @@ [2 of 3] Compiling T11167_ambiguous_fixity_B ( T11167_ambiguous_fixity_B.hs, T11167_ambiguous_fixity_B.o ) [3 of 3] Compiling T11167_ambiguous_fixity ( T11167_ambiguous_fixity.hs, T11167_ambiguous_fixity.o ) - T11167_ambiguous_fixity.hs:6:16: +T11167_ambiguous_fixity.hs:6:16: error: Ambiguous occurrence ‘foo’ It could refer to - either the field ‘foo’, + either the field ‘foo’ of record ‘C’, imported from ‘T11167_ambiguous_fixity_A’ at T11167_ambiguous_fixity.hs:3:1-32 (and originally defined at T11167_ambiguous_fixity_A.hs:4:16-18) - or the field ‘foo’, + or the field ‘foo’ of record ‘A’, imported from ‘T11167_ambiguous_fixity_A’ at T11167_ambiguous_fixity.hs:3:1-32 (and originally defined at T11167_ambiguous_fixity_A.hs:3:16-18) - or the field ‘foo’, + or the field ‘foo’ of record ‘B’, imported from ‘T11167_ambiguous_fixity_B’ at T11167_ambiguous_fixity.hs:4:1-32 (and originally defined at T11167_ambiguous_fixity_B.hs:2:16-18) diff --git a/testsuite/tests/overloadedrecflds/should_fail/T13132_duplicaterecflds.stderr b/testsuite/tests/overloadedrecflds/should_fail/T13132_duplicaterecflds.stderr index d43b70ce3f..a2a4428b0b 100644 --- a/testsuite/tests/overloadedrecflds/should_fail/T13132_duplicaterecflds.stderr +++ b/testsuite/tests/overloadedrecflds/should_fail/T13132_duplicaterecflds.stderr @@ -1,22 +1,22 @@ - T13132_duplicaterecflds.hs:7:16: +T13132_duplicaterecflds.hs:7:16: error: Ambiguous occurrence ‘runContT’ It could refer to - either the field ‘runContT’, + either the field ‘runContT’ of record ‘ContT2’, defined at T13132_duplicaterecflds.hs:5:33 - or the field ‘runContT’, + or the field ‘runContT’ of record ‘ContT’, defined at T13132_duplicaterecflds.hs:4:31 -T13132_duplicaterecflds.hs:9:11: +T13132_duplicaterecflds.hs:9:11: error: The operator ‘runContT’ [infixl 9] of a section must have lower precedence than that of the operand, namely ‘y’ [infixl 9] in the section: ‘`runContT` x `y` x’ - T13132_duplicaterecflds.hs:9:12: +T13132_duplicaterecflds.hs:9:12: error: Ambiguous occurrence ‘runContT’ It could refer to - either the field ‘runContT’, + either the field ‘runContT’ of record ‘ContT2’, defined at T13132_duplicaterecflds.hs:5:33 - or the field ‘runContT’, + or the field ‘runContT’ of record ‘ContT’, defined at T13132_duplicaterecflds.hs:4:31 diff --git a/testsuite/tests/overloadedrecflds/should_fail/T17420.hs b/testsuite/tests/overloadedrecflds/should_fail/T17420.hs new file mode 100644 index 0000000000..c54c3cfbc6 --- /dev/null +++ b/testsuite/tests/overloadedrecflds/should_fail/T17420.hs @@ -0,0 +1,6 @@ +{-# LANGUAGE DuplicateRecordFields #-} +module T17420 where + +import T17420A + +foo = undefined name diff --git a/testsuite/tests/overloadedrecflds/should_fail/T17420.stderr b/testsuite/tests/overloadedrecflds/should_fail/T17420.stderr new file mode 100644 index 0000000000..5089f19ce2 --- /dev/null +++ b/testsuite/tests/overloadedrecflds/should_fail/T17420.stderr @@ -0,0 +1,12 @@ +[1 of 2] Compiling T17420A ( T17420A.hs, T17420A.o ) +[2 of 2] Compiling T17420 ( T17420.hs, T17420.o ) + +T17420.hs:6:17: error: + Ambiguous occurrence ‘name’ + It could refer to + either the field ‘name’ of record ‘Human’, + imported from ‘T17420A’ at T17420.hs:4:1-14 + (and originally defined at T17420A.hs:5:22-25) + or the field ‘name’ of record ‘Dog’, + imported from ‘T17420A’ at T17420.hs:4:1-14 + (and originally defined at T17420A.hs:4:18-21) diff --git a/testsuite/tests/overloadedrecflds/should_fail/T17420A.hs b/testsuite/tests/overloadedrecflds/should_fail/T17420A.hs new file mode 100644 index 0000000000..03eaf2f518 --- /dev/null +++ b/testsuite/tests/overloadedrecflds/should_fail/T17420A.hs @@ -0,0 +1,5 @@ +{-# LANGUAGE DuplicateRecordFields #-} +module T17420A where + +data Dog = Dog { name::String } +data Human = Human { name::Int } diff --git a/testsuite/tests/overloadedrecflds/should_fail/T18999_NoDisambiguateRecordFields.stderr b/testsuite/tests/overloadedrecflds/should_fail/T18999_NoDisambiguateRecordFields.stderr index 425e8d7245..d271efc7f8 100644 --- a/testsuite/tests/overloadedrecflds/should_fail/T18999_NoDisambiguateRecordFields.stderr +++ b/testsuite/tests/overloadedrecflds/should_fail/T18999_NoDisambiguateRecordFields.stderr @@ -5,7 +5,7 @@ T18999_NoDisambiguateRecordFields.hs:6:13: error: either ‘Prelude.not’, imported from ‘Prelude’ at T18999_NoDisambiguateRecordFields.hs:2:8-40 (and originally defined in ‘GHC.Classes’) - or the field ‘not’, + or the field ‘not’ of record ‘Foo’, defined at T18999_NoDisambiguateRecordFields.hs:4:18 T18999_NoDisambiguateRecordFields.hs:8:11: error: @@ -14,5 +14,5 @@ T18999_NoDisambiguateRecordFields.hs:8:11: error: either ‘Prelude.not’, imported from ‘Prelude’ at T18999_NoDisambiguateRecordFields.hs:2:8-40 (and originally defined in ‘GHC.Classes’) - or the field ‘not’, + or the field ‘not’ of record ‘Foo’, defined at T18999_NoDisambiguateRecordFields.hs:4:18 diff --git a/testsuite/tests/overloadedrecflds/should_fail/all.T b/testsuite/tests/overloadedrecflds/should_fail/all.T index b6729376cb..5e8d0614a0 100644 --- a/testsuite/tests/overloadedrecflds/should_fail/all.T +++ b/testsuite/tests/overloadedrecflds/should_fail/all.T @@ -32,6 +32,8 @@ test('hasfieldfail03', normal, compile_fail, ['']) test('T14953', [extra_files(['T14953_A.hs', 'T14953_B.hs'])], multimod_compile_fail, ['T14953', '']) test('DuplicateExports', normal, compile_fail, ['']) +test('T17420', [extra_files(['T17420A.hs'])], multimod_compile_fail, + ['T17420', '']) test('T17469', [extra_files(['T17469A.hs'])], multimod_compile_fail, ['T17469', '']) test('T17965', normal, compile_fail, ['']) diff --git a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail02.stderr b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail02.stderr index 7591e8be6c..f6d03433fb 100644 --- a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail02.stderr +++ b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail02.stderr @@ -2,5 +2,7 @@ overloadedrecfldsfail02.hs:8:18: error: Ambiguous occurrence ‘x’ It could refer to - either the field ‘x’, defined at overloadedrecfldsfail02.hs:6:16 - or the field ‘x’, defined at overloadedrecfldsfail02.hs:5:16 + either the field ‘x’ of record ‘S’, + defined at overloadedrecfldsfail02.hs:6:16 + or the field ‘x’ of record ‘R’, + defined at overloadedrecfldsfail02.hs:5:16 diff --git a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail04.stderr b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail04.stderr index fe4b469e62..6aa4669729 100644 --- a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail04.stderr +++ b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail04.stderr @@ -4,9 +4,9 @@ overloadedrecfldsfail04.hs:9:6: error: Ambiguous occurrence ‘I.x’ It could refer to - either the field ‘x’, + either the field ‘x’ of record ‘V’, imported from ‘OverloadedRecFldsFail04_A’ at overloadedrecfldsfail04.hs:6:1-37 (and originally defined at OverloadedRecFldsFail04_A.hs:6:16) - or the field ‘x’, + or the field ‘x’ of record ‘U’, imported from ‘OverloadedRecFldsFail04_A’ at overloadedrecfldsfail04.hs:6:1-37 (and originally defined at OverloadedRecFldsFail04_A.hs:5:16) diff --git a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail11.stderr b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail11.stderr index a509f54beb..a146a0e9c6 100644 --- a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail11.stderr +++ b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail11.stderr @@ -4,9 +4,9 @@ overloadedrecfldsfail11.hs:5:15: error: Ambiguous occurrence ‘foo’ It could refer to - either the field ‘foo’, + either the field ‘foo’ of record ‘T’, imported from ‘OverloadedRecFldsFail11_A’ at overloadedrecfldsfail11.hs:3:1-32 (and originally defined at OverloadedRecFldsFail11_A.hs:6:16-18) - or the field ‘foo’, + or the field ‘foo’ of record ‘S’, imported from ‘OverloadedRecFldsFail11_A’ at overloadedrecfldsfail11.hs:3:1-32 (and originally defined at OverloadedRecFldsFail11_A.hs:5:16-18) diff --git a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail12.stderr b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail12.stderr index 62f9cd3e3c..28ebc96009 100644 --- a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail12.stderr +++ b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail12.stderr @@ -4,15 +4,17 @@ overloadedrecfldsfail12.hs:13:5: error: Ambiguous occurrence ‘foo’ It could refer to - either the field ‘foo’, + either the field ‘foo’ of record ‘T’, imported from ‘OverloadedRecFldsFail12_A’ at overloadedrecfldsfail12.hs:4:1-32 (and originally defined at OverloadedRecFldsFail12_A.hs:5:16-18) - or the field ‘foo’, defined at overloadedrecfldsfail12.hs:6:16 + or the field ‘foo’ of record ‘S’, + defined at overloadedrecfldsfail12.hs:6:16 overloadedrecfldsfail12.hs:16:5: error: Ambiguous occurrence ‘foo’ It could refer to - either the field ‘foo’, + either the field ‘foo’ of record ‘T’, imported from ‘OverloadedRecFldsFail12_A’ at overloadedrecfldsfail12.hs:4:1-32 (and originally defined at OverloadedRecFldsFail12_A.hs:5:16-18) - or the field ‘foo’, defined at overloadedrecfldsfail12.hs:6:16 + or the field ‘foo’ of record ‘S’, + defined at overloadedrecfldsfail12.hs:6:16 diff --git a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail13.stderr b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail13.stderr index ea8b6c4531..20c9e2dd97 100644 --- a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail13.stderr +++ b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail13.stderr @@ -1,24 +1,32 @@ - overloadedrecfldsfail13.hs:10:5: +overloadedrecfldsfail13.hs:10:5: error: Ambiguous occurrence ‘x’ It could refer to - either the field ‘x’, defined at overloadedrecfldsfail13.hs:7:16 - or the field ‘x’, defined at overloadedrecfldsfail13.hs:6:16 + either the field ‘x’ of record ‘T’, + defined at overloadedrecfldsfail13.hs:7:16 + or the field ‘x’ of record ‘S’, + defined at overloadedrecfldsfail13.hs:6:16 - overloadedrecfldsfail13.hs:12:5: +overloadedrecfldsfail13.hs:12:5: error: Ambiguous occurrence ‘x’ It could refer to - either the field ‘x’, defined at overloadedrecfldsfail13.hs:7:16 - or the field ‘x’, defined at overloadedrecfldsfail13.hs:6:16 + either the field ‘x’ of record ‘T’, + defined at overloadedrecfldsfail13.hs:7:16 + or the field ‘x’ of record ‘S’, + defined at overloadedrecfldsfail13.hs:6:16 - overloadedrecfldsfail13.hs:15:5: +overloadedrecfldsfail13.hs:15:5: error: Ambiguous occurrence ‘x’ It could refer to - either the field ‘x’, defined at overloadedrecfldsfail13.hs:7:16 - or the field ‘x’, defined at overloadedrecfldsfail13.hs:6:16 + either the field ‘x’ of record ‘T’, + defined at overloadedrecfldsfail13.hs:7:16 + or the field ‘x’ of record ‘S’, + defined at overloadedrecfldsfail13.hs:6:16 - overloadedrecfldsfail13.hs:18:5: +overloadedrecfldsfail13.hs:18:5: error: Ambiguous occurrence ‘x’ It could refer to - either the field ‘x’, defined at overloadedrecfldsfail13.hs:7:16 - or the field ‘x’, defined at overloadedrecfldsfail13.hs:6:16 + either the field ‘x’ of record ‘T’, + defined at overloadedrecfldsfail13.hs:7:16 + or the field ‘x’ of record ‘S’, + defined at overloadedrecfldsfail13.hs:6:16 diff --git a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldswasrunnowfail06.stderr b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldswasrunnowfail06.stderr index de8cc1aadf..789d87a6a3 100644 --- a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldswasrunnowfail06.stderr +++ b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldswasrunnowfail06.stderr @@ -1,40 +1,40 @@ - overloadedrecfldswasrunnowfail06.hs:11:11: +overloadedrecfldswasrunnowfail06.hs:11:11: error: Ambiguous occurrence ‘x’ It could refer to - either the field ‘x’, + either the field ‘x’ of record ‘U’, defined at overloadedrecfldswasrunnowfail06.hs:8:18 - or the field ‘x’, + or the field ‘x’ of record ‘T’, defined at overloadedrecfldswasrunnowfail06.hs:7:16 - or the field ‘x’, + or the field ‘x’ of record ‘S’, defined at overloadedrecfldswasrunnowfail06.hs:6:16 - overloadedrecfldswasrunnowfail06.hs:13:11: +overloadedrecfldswasrunnowfail06.hs:13:11: error: Ambiguous occurrence ‘x’ It could refer to - either the field ‘x’, + either the field ‘x’ of record ‘U’, defined at overloadedrecfldswasrunnowfail06.hs:8:18 - or the field ‘x’, + or the field ‘x’ of record ‘T’, defined at overloadedrecfldswasrunnowfail06.hs:7:16 - or the field ‘x’, + or the field ‘x’ of record ‘S’, defined at overloadedrecfldswasrunnowfail06.hs:6:16 - overloadedrecfldswasrunnowfail06.hs:15:13: +overloadedrecfldswasrunnowfail06.hs:15:13: error: Ambiguous occurrence ‘x’ It could refer to - either the field ‘x’, + either the field ‘x’ of record ‘U’, defined at overloadedrecfldswasrunnowfail06.hs:8:18 - or the field ‘x’, + or the field ‘x’ of record ‘T’, defined at overloadedrecfldswasrunnowfail06.hs:7:16 - or the field ‘x’, + or the field ‘x’ of record ‘S’, defined at overloadedrecfldswasrunnowfail06.hs:6:16 - overloadedrecfldswasrunnowfail06.hs:21:20: +overloadedrecfldswasrunnowfail06.hs:21:20: error: Ambiguous occurrence ‘x’ It could refer to - either the field ‘x’, + either the field ‘x’ of record ‘U’, defined at overloadedrecfldswasrunnowfail06.hs:8:18 - or the field ‘x’, + or the field ‘x’ of record ‘T’, defined at overloadedrecfldswasrunnowfail06.hs:7:16 - or the field ‘x’, + or the field ‘x’ of record ‘S’, defined at overloadedrecfldswasrunnowfail06.hs:6:16 diff --git a/testsuite/tests/rename/should_fail/T11167_ambig.stderr b/testsuite/tests/rename/should_fail/T11167_ambig.stderr index bf1029b81d..8c9c6a7848 100644 --- a/testsuite/tests/rename/should_fail/T11167_ambig.stderr +++ b/testsuite/tests/rename/should_fail/T11167_ambig.stderr @@ -1,12 +1,16 @@ - T11167_ambig.hs:10:13: +T11167_ambig.hs:10:13: error: 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 + either the field ‘runContT’ of record ‘ContT'’, + defined at T11167_ambig.hs:7:32 + or the field ‘runContT’ of record ‘ContT’, + defined at T11167_ambig.hs:6:30 - T11167_ambig.hs:17:9: +T11167_ambig.hs:17:9: error: 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 + either the field ‘runContT’ of record ‘ContT'’, + defined at T11167_ambig.hs:7:32 + or the field ‘runContT’ of record ‘ContT’, + defined at T11167_ambig.hs:6:30 |