diff options
author | Jakob Brünker <jakob.bruenker@gmail.com> | 2021-05-16 07:09:58 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-05-21 06:22:47 -0400 |
commit | d9eb8bbf38cda5b6c885fad8ae8addea3325ce42 (patch) | |
tree | a7eaa0e7ce587e6d8037667fb28367f3e830e9db /testsuite/tests/rename/should_fail/T19843g.hs | |
parent | 703c0c3c13cad700ae998de062134119bd33071f (diff) | |
download | haskell-d9eb8bbf38cda5b6c885fad8ae8addea3325ce42.tar.gz |
Only suggest names that make sense (#19843)
* Don't show suggestions for similar variables when a data constructor
in a pattern is not in scope.
* Only suggest record fields when a record field for record creation or
updating is not in scope.
* Suggest similar record fields when a record field is not in scope with
-XOverloadedRecordDot.
* Show suggestions for data constructors if a type constructor or type
is not in scope, but only if -XDataKinds is enabled.
Fixes #19843.
Diffstat (limited to 'testsuite/tests/rename/should_fail/T19843g.hs')
-rw-r--r-- | testsuite/tests/rename/should_fail/T19843g.hs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/testsuite/tests/rename/should_fail/T19843g.hs b/testsuite/tests/rename/should_fail/T19843g.hs new file mode 100644 index 0000000000..22db3381f3 --- /dev/null +++ b/testsuite/tests/rename/should_fail/T19843g.hs @@ -0,0 +1,10 @@ +{-# LANGUAGE NoFieldSelectors #-} + +module T19843g where + +import Prelude (Int, map) + +data A = A {mop :: ()} +data Mup = Mup + +foo = foo {mup = 1} |