diff options
Diffstat (limited to 'testsuite/tests/parser/should_fail/RecordDotSyntaxFail2.hs')
-rw-r--r-- | testsuite/tests/parser/should_fail/RecordDotSyntaxFail2.hs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/testsuite/tests/parser/should_fail/RecordDotSyntaxFail2.hs b/testsuite/tests/parser/should_fail/RecordDotSyntaxFail2.hs new file mode 100644 index 0000000000..39a3e0256b --- /dev/null +++ b/testsuite/tests/parser/should_fail/RecordDotSyntaxFail2.hs @@ -0,0 +1,11 @@ +{-# LANGUAGE OverloadedRecordDot #-} -- Enable '.' +{-# LANGUAGE NoOverloadedRecordUpdate #-} -- Definitely not enable overloaded updates. + +data Foo = Foo { foo :: Bar } +data Bar = Bar { bar :: Baz } +data Baz = Baz { baz :: Quux } +data Quux = Quux { quux :: Int } + +no :: Foo -> Foo +no foo = foo { bar.baz = Quux { quux = 42 } } } } +-- For this to work, OverloadedRecordUpdate must be enabled |