Commit f8e0e9ed authored by Ian Lynagh's avatar Ian Lynagh

Add tests for NoTraditionalRecordSyntax

parent 11152ac0
......@@ -69,3 +69,7 @@ test('T3811f', normal, compile_fail, [''])
test('T3811g', normal, compile_fail, [''])
test('NoDoAndIfThenElse', normal, compile_fail, [''])
test('NondecreasingIndentationFail', normal, compile_fail, [''])
test('readFailTraditionalRecords1', normal, compile_fail, [''])
test('readFailTraditionalRecords2', normal, compile_fail, [''])
test('readFailTraditionalRecords3', normal, compile_fail, [''])
{-# LANGUAGE NoTraditionalRecordSyntax #-}
module ReadFailTraditionalRecords1 where
data Foo = Foo { i :: Int }
readFailTraditionalRecords1.hs:6:16:
Illegal record syntax (use -XTraditionalRecordSyntax): {i :: Int}
{-# LANGUAGE NoTraditionalRecordSyntax #-}
module ReadFailTraditionalRecords2 where
f (Foo { i = j }) = j
readFailTraditionalRecords2.hs:6:4:
Illegal record syntax (use -XTraditionalRecordSyntax): Foo {i = j}
{-# LANGUAGE NoTraditionalRecordSyntax #-}
module ReadFailTraditionalRecords3 where
f x = x { i = 3 }
readFailTraditionalRecords3.hs:6:7:
Illegal record syntax (use -XTraditionalRecordSyntax): x {i = 3}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment