diff options
author | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2020-09-24 21:02:09 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-09-25 21:15:14 -0400 |
commit | 6a7dae4badcea5b3519005cf4e5fbf15f7e5df59 (patch) | |
tree | eb97e0fbb778f6600e674fe2f5f9a8bd8bd7c6d2 /testsuite/tests/linear | |
parent | 04bc50b3c8e40387a0d0f090ea23cd68923f1834 (diff) | |
download | haskell-6a7dae4badcea5b3519005cf4e5fbf15f7e5df59.tar.gz |
Fix typed holes causing linearity errors (#18491)
Diffstat (limited to 'testsuite/tests/linear')
-rw-r--r-- | testsuite/tests/linear/should_compile/LinearHole.hs | 7 | ||||
-rw-r--r-- | testsuite/tests/linear/should_compile/all.T | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/testsuite/tests/linear/should_compile/LinearHole.hs b/testsuite/tests/linear/should_compile/LinearHole.hs new file mode 100644 index 0000000000..e4c5181d9e --- /dev/null +++ b/testsuite/tests/linear/should_compile/LinearHole.hs @@ -0,0 +1,7 @@ +{-# LANGUAGE LinearTypes #-} +{-# OPTIONS_GHC -fdefer-typed-holes -Wno-typed-holes #-} + +module LinearHole where -- #18491 + +f :: Int #-> Bool #-> Char +f x y = _1 diff --git a/testsuite/tests/linear/should_compile/all.T b/testsuite/tests/linear/should_compile/all.T index 8b11b9ccb9..5a4b47c269 100644 --- a/testsuite/tests/linear/should_compile/all.T +++ b/testsuite/tests/linear/should_compile/all.T @@ -35,3 +35,4 @@ test('MultConstructor', expect_broken(broken_multiplicity_syntax), compile, [''] 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, ['']) |