diff options
Diffstat (limited to 'testsuite/tests/simplCore/should_compile')
-rw-r--r-- | testsuite/tests/simplCore/should_compile/T23267.hs | 25 | ||||
-rw-r--r-- | testsuite/tests/simplCore/should_compile/T23267.script | 1 | ||||
-rw-r--r-- | testsuite/tests/simplCore/should_compile/all.T | 1 |
3 files changed, 27 insertions, 0 deletions
diff --git a/testsuite/tests/simplCore/should_compile/T23267.hs b/testsuite/tests/simplCore/should_compile/T23267.hs new file mode 100644 index 0000000000..02307cea5d --- /dev/null +++ b/testsuite/tests/simplCore/should_compile/T23267.hs @@ -0,0 +1,25 @@ +module T23267 where + +data N = Z | S N + +union :: N -> () +union Z = () +union t = splitS t + +splitS :: N -> () +splitS Z = () +splitS (S l) = splitS l + +{- Results in this error: + +*** Core Lint errors : in result of SpecConstr *** +T23267.hs:10:1: warning: + Out of scope: l_aBE :: N + [LclId] + In the RHS of $ssplitS_sJx :: N -> () + In the body of lambda with binder sc_sJw :: N + Substitution: <InScope = {} + IdSubst = [] + TvSubst = [] + CvSubst = []> +-} diff --git a/testsuite/tests/simplCore/should_compile/T23267.script b/testsuite/tests/simplCore/should_compile/T23267.script new file mode 100644 index 0000000000..75e8cf5aaf --- /dev/null +++ b/testsuite/tests/simplCore/should_compile/T23267.script @@ -0,0 +1 @@ +:load T23267 diff --git a/testsuite/tests/simplCore/should_compile/all.T b/testsuite/tests/simplCore/should_compile/all.T index 90e67d81fe..ae48423fa0 100644 --- a/testsuite/tests/simplCore/should_compile/all.T +++ b/testsuite/tests/simplCore/should_compile/all.T @@ -477,3 +477,4 @@ test('T23012', normal, compile, ['-O']) test('RewriteHigherOrderPatterns', normal, compile, ['-O -ddump-rule-rewrites -dsuppress-all -dsuppress-uniques']) test('T23024', normal, multimod_compile, ['T23024', '-O -v0']) test('T23026', normal, compile, ['-O']) +test('T23267', [expect_broken(23267), only_ways(['ghci']), extra_hc_opts('-fno-unoptimized-core-for-interpreter -fspec-constr')], ghci_script, ['T23267.script']) |