diff options
author | Adam Gundry <adam@well-typed.com> | 2021-01-08 19:27:45 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-02-26 16:25:39 -0500 |
commit | 80eda911ef1ea711a9e3e51ad510dfe5a9a09ae9 (patch) | |
tree | aa7e1614c76b5c5c31ca772c8300a115c62e9684 /testsuite/tests/rename | |
parent | 29e7f318209794206033065cdc0874a5afe0ad47 (diff) | |
download | haskell-80eda911ef1ea711a9e3e51ad510dfe5a9a09ae9.tar.gz |
Implement -Wambiguous-fields
Fixes #18966. Adds a new warning -Wambiguous-fields for uses of field selectors
or record updates that will be rejected in the future, when the DuplicateRecordFields
extension is simplified per https://github.com/ghc-proposals/ghc-proposals/pull/366.
Diffstat (limited to 'testsuite/tests/rename')
-rw-r--r-- | testsuite/tests/rename/should_compile/T11167_ambig.stderr | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/testsuite/tests/rename/should_compile/T11167_ambig.stderr b/testsuite/tests/rename/should_compile/T11167_ambig.stderr new file mode 100644 index 0000000000..5320b42149 --- /dev/null +++ b/testsuite/tests/rename/should_compile/T11167_ambig.stderr @@ -0,0 +1,11 @@ + +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. |