diff options
author | Kevin Buhr <buhr@asaurus.net> | 2019-05-06 21:42:33 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-05-07 17:09:13 -0400 |
commit | f58ea556538c048b05607be869feb677b1083175 (patch) | |
tree | 734995d62620101682611f2ee3e5b396349b9180 | |
parent | 78a5c4ce6bae233b655097ada3901028104f0f27 (diff) | |
download | haskell-f58ea556538c048b05607be869feb677b1083175.tar.gz |
Add regression test for old typechecking issue #505
-rw-r--r-- | testsuite/tests/typecheck/should_compile/T505.hs | 14 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_compile/all.T | 3 |
2 files changed, 16 insertions, 1 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T505.hs b/testsuite/tests/typecheck/should_compile/T505.hs new file mode 100644 index 0000000000..39f567d0aa --- /dev/null +++ b/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 diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T index ffcdc93a73..f7d92b6210 100644 --- a/testsuite/tests/typecheck/should_compile/all.T +++ b/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, ['']) |