summaryrefslogtreecommitdiff
path: root/testsuite/tests/linear/should_fail/Linear1.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/linear/should_fail/Linear1.hs')
-rw-r--r--testsuite/tests/linear/should_fail/Linear1.hs14
1 files changed, 14 insertions, 0 deletions
diff --git a/testsuite/tests/linear/should_fail/Linear1.hs b/testsuite/tests/linear/should_fail/Linear1.hs
new file mode 100644
index 0000000000..cdb7eed939
--- /dev/null
+++ b/testsuite/tests/linear/should_fail/Linear1.hs
@@ -0,0 +1,14 @@
+{-# LANGUAGE LinearTypes #-}
+{-# LANGUAGE UnicodeSyntax #-}
+{-# LANGUAGE LambdaCase, GADTs #-}
+{-# LANGUAGE RebindableSyntax #-}
+module Linear1 where
+
+
+-- Must fail:
+incorrectDup :: a ⊸ (a,a)
+incorrectDup x = (x,x)
+
+-- Must fail:
+incorrectDrop :: a ⊸ ()
+incorrectDrop x = ()