[Git][ghc/ghc][master] Add regression test for old typechecking issue #505

Marge Bot gitlab at gitlab.haskell.org
Tue May 7 21:15:15 UTC 2019



 Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
f58ea556 by Kevin Buhr at 2019-05-07T21:09:13Z
Add regression test for old typechecking issue #505

- - - - -


2 changed files:

- + testsuite/tests/typecheck/should_compile/T505.hs
- testsuite/tests/typecheck/should_compile/all.T


Changes:

=====================================
testsuite/tests/typecheck/should_compile/T505.hs
=====================================
@@ -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


=====================================
testsuite/tests/typecheck/should_compile/all.T
=====================================
@@ -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, [''])



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/f58ea556538c048b05607be869feb677b1083175

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/f58ea556538c048b05607be869feb677b1083175
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20190507/ff9d19bc/attachment.html>


More information about the ghc-commits mailing list