summaryrefslogtreecommitdiff
path: root/testsuite/tests/simplCore/should_compile/T23267.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/simplCore/should_compile/T23267.hs')
-rw-r--r--testsuite/tests/simplCore/should_compile/T23267.hs25
1 files changed, 25 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 = []>
+-}