diff options
Diffstat (limited to 'testsuite/tests/linear/should_fail/LinearRecordUpdate.hs')
-rw-r--r-- | testsuite/tests/linear/should_fail/LinearRecordUpdate.hs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/testsuite/tests/linear/should_fail/LinearRecordUpdate.hs b/testsuite/tests/linear/should_fail/LinearRecordUpdate.hs new file mode 100644 index 0000000000..e143dbd604 --- /dev/null +++ b/testsuite/tests/linear/should_fail/LinearRecordUpdate.hs @@ -0,0 +1,8 @@ +{-# LANGUAGE LinearTypes #-} + +module LinearRecordUpdate where + +data R = R { x :: Int, y :: Bool } + +shouldFail :: R #-> R +shouldFail r = r { y = False } |