summaryrefslogtreecommitdiff
path: root/testsuite/tests
diff options
context:
space:
mode:
authorKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2020-09-21 17:49:43 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-09-26 13:18:22 -0400
commitbda55fa0444310079ab89f2d28ddb8982975b646 (patch)
tree04f6a2515d81b3ca3c0da3d8c072cd40cd3fdd80 /testsuite/tests
parent1cde295c543e209c3b81256b50e77f3c5132a4ad (diff)
downloadhaskell-bda55fa0444310079ab89f2d28ddb8982975b646.tar.gz
Make 'undefined x' linear in 'x' (#18731)
Diffstat (limited to 'testsuite/tests')
-rw-r--r--testsuite/tests/linear/should_compile/T18731.hs5
-rw-r--r--testsuite/tests/linear/should_compile/all.T1
2 files changed, 6 insertions, 0 deletions
diff --git a/testsuite/tests/linear/should_compile/T18731.hs b/testsuite/tests/linear/should_compile/T18731.hs
new file mode 100644
index 0000000000..c7899efb54
--- /dev/null
+++ b/testsuite/tests/linear/should_compile/T18731.hs
@@ -0,0 +1,5 @@
+{-# LANGUAGE LinearTypes #-}
+module T18731 where
+
+f :: a #-> b
+f x = undefined x
diff --git a/testsuite/tests/linear/should_compile/all.T b/testsuite/tests/linear/should_compile/all.T
index 5a4b47c269..d624a337ba 100644
--- a/testsuite/tests/linear/should_compile/all.T
+++ b/testsuite/tests/linear/should_compile/all.T
@@ -36,3 +36,4 @@ test('LinearLetRec', expect_broken(405), compile, ['-O -dlinear-core-lint'])
test('LinearTH1', normal, compile, [''])
test('LinearTH2', expect_broken(broken_multiplicity_syntax), compile, [''])
test('LinearHole', normal, compile, [''])
+test('T18731', normal, compile, [''])