diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2020-11-09 09:09:59 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-11-21 01:14:44 -0500 |
commit | ddbeeb3c7dc7a2781801cc0e6539d2b4b0e97a20 (patch) | |
tree | bdf5b8affc0b6560addb4d6ddfef50835e0d711d /testsuite/tests | |
parent | 72f2257c792e6178933f12ee3401939da11584b6 (diff) | |
download | haskell-ddbeeb3c7dc7a2781801cc0e6539d2b4b0e97a20.tar.gz |
Add regression test for #10504
This issue was fixed at some point between GHC 8.0 and 8.2. Let's add a
regression test to ensure that it stays fixed.
Fixes #10504.
Diffstat (limited to 'testsuite/tests')
4 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T10504.hs b/testsuite/tests/typecheck/should_compile/T10504.hs new file mode 100644 index 0000000000..2af5aac2e5 --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/T10504.hs @@ -0,0 +1,5 @@ +module T10504 where + +import T10504a + +{-# SPECIALISE myfun :: Double #-} diff --git a/testsuite/tests/typecheck/should_compile/T10504.stderr b/testsuite/tests/typecheck/should_compile/T10504.stderr new file mode 100644 index 0000000000..9459623482 --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/T10504.stderr @@ -0,0 +1,3 @@ + +T10504.hs:5:1: warning: + SPECIALISE pragma for non-overloaded function ‘myfun’ diff --git a/testsuite/tests/typecheck/should_compile/T10504a.hs b/testsuite/tests/typecheck/should_compile/T10504a.hs new file mode 100644 index 0000000000..d3eb73c3f3 --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/T10504a.hs @@ -0,0 +1,6 @@ +module T10504a where + +{-# INLINABLE myfun #-} + +myfun :: a +myfun = undefined diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T index 4482e3fdc4..08f4b803c8 100644 --- a/testsuite/tests/typecheck/should_compile/all.T +++ b/testsuite/tests/typecheck/should_compile/all.T @@ -468,6 +468,7 @@ test('T10494', normal, compile, ['']) test('T10493', normal, compile, ['']) test('T10428', normal, compile, ['']) test('RepArrow', normal, compile, ['']) +test('T10504', normal, multimod_compile, ['T10504', '-O -v0']) test('T10562', normal, compile, ['']) test('T10564', normal, compile, ['']) test('Vta1', normal, compile, ['']) |