diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2020-11-09 09:09:59 -0500 |
---|---|---|
committer | Ryan Scott <ryan.gl.scott@gmail.com> | 2020-11-09 09:10:01 -0500 |
commit | 1f3d4ab679e98d7a7fe0281485c8eca2b966c752 (patch) | |
tree | 4e044badd0974d89e13787930e2b763b1ccabec7 | |
parent | 22888798d224f96202480595fc49bc5c4b2f8328 (diff) | |
download | haskell-1f3d4ab679e98d7a7fe0281485c8eca2b966c752.tar.gz |
Add regression test for #10504wip/T10504
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.
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 d02c3ee2fa..e2473fe540 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, ['']) |