diff options
Diffstat (limited to 'testsuite/tests/parser/should_fail/RecordDotSyntaxFail11.hs')
-rw-r--r-- | testsuite/tests/parser/should_fail/RecordDotSyntaxFail11.hs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/testsuite/tests/parser/should_fail/RecordDotSyntaxFail11.hs b/testsuite/tests/parser/should_fail/RecordDotSyntaxFail11.hs new file mode 100644 index 0000000000..62f9bd8f23 --- /dev/null +++ b/testsuite/tests/parser/should_fail/RecordDotSyntaxFail11.hs @@ -0,0 +1,8 @@ +{-# LANGUAGE OverloadedRecordDot #-} + +data Foo = Foo { foo :: Bar } +data Bar = Bar { bar :: Int } + +main = do + let a = Foo { foo = Bar { bar = 1 }} + print $ (.foo.bar.baz) a -- Oops, what is baz? |