diff options
Diffstat (limited to 'testsuite/tests/overloadedrecflds/should_fail/NFSDuplicate.hs')
-rw-r--r-- | testsuite/tests/overloadedrecflds/should_fail/NFSDuplicate.hs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/testsuite/tests/overloadedrecflds/should_fail/NFSDuplicate.hs b/testsuite/tests/overloadedrecflds/should_fail/NFSDuplicate.hs new file mode 100644 index 0000000000..5da0175a1e --- /dev/null +++ b/testsuite/tests/overloadedrecflds/should_fail/NFSDuplicate.hs @@ -0,0 +1,10 @@ +{-# LANGUAGE NoFieldSelectors #-} +{-# LANGUAGE NoDuplicateRecordFields #-} +module NFSDuplicate where + +-- Two definitions of 'foo' as fields is an error, even though it is permitted +-- to define it as a non-field. +data S = MkS { foo :: Int } +data T = MkT { foo :: Int } + +foo = () |