Add regression test for old typechecking issue #505
authorKevin Buhr <buhr@asaurus.net>
Tue, 7 May 2019 02:42:33 +0000 (21:42 -0500)
committerMarge Bot <ben+marge-bot@smart-cactus.org>
Tue, 7 May 2019 21:09:13 +0000 (17:09 -0400)
testsuite/tests/typecheck/should_compile/T505.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_compile/all.T

diff --git a/testsuite/tests/typecheck/should_compile/T505.hs b/testsuite/tests/typecheck/should_compile/T505.hs
new file mode 100644 (file)
index 0000000..39f567d
--- /dev/null
@@ -0,0 +1,14 @@
+{-# OPTIONS_GHC -Wno-inline-rule-shadowing #-}
+module Bug where
+
+foo 1 = 2
+bar 0 = 1
+
+-- regression test for #505:
+-- the following rule should not case a panic
+
+{-# RULES
+  "foo/bar" foo bar = foobar
+ #-}
+
+foobar = 2
index ffcdc93..f7d92b6 100644 (file)
@@ -671,4 +671,5 @@ test('T16204b', normal, compile, [''])
 test('T16225', normal, compile, [''])
 test('T13951', normal, compile, [''])
 test('T16411', normal, compile, [''])
-test('T16609', normal, compile, [''])
\ No newline at end of file
+test('T16609', normal, compile, [''])
+test('T505', normal, compile, [''])