[commit: ghc] master: Add test for Trac #14232 (93da9f9)

git at git.haskell.org git at git.haskell.org
Thu Sep 14 16:20:39 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/93da9f95b0c921f0d50a34bd1202c6428ff7ba5b/ghc

>---------------------------------------------------------------

commit 93da9f95b0c921f0d50a34bd1202c6428ff7ba5b
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Thu Sep 14 17:20:14 2017 +0100

    Add test for Trac #14232


>---------------------------------------------------------------

93da9f95b0c921f0d50a34bd1202c6428ff7ba5b
 testsuite/tests/typecheck/should_fail/T14232.hs     | 4 ++++
 testsuite/tests/typecheck/should_fail/T14232.stderr | 4 ++++
 testsuite/tests/typecheck/should_fail/all.T         | 1 +
 3 files changed, 9 insertions(+)

diff --git a/testsuite/tests/typecheck/should_fail/T14232.hs b/testsuite/tests/typecheck/should_fail/T14232.hs
new file mode 100644
index 0000000..79da2cc
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/T14232.hs
@@ -0,0 +1,4 @@
+module T14232 where
+
+f :: (String -> a) String -> a
+f g s = g s
diff --git a/testsuite/tests/typecheck/should_fail/T14232.stderr b/testsuite/tests/typecheck/should_fail/T14232.stderr
new file mode 100644
index 0000000..a497be7
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/T14232.stderr
@@ -0,0 +1,4 @@
+
+T14232.hs:3:6: error:
+    • Expected kind ‘* -> *’, but ‘String -> a’ has kind ‘*’
+    • In the type signature: f :: (String -> a) String -> a
diff --git a/testsuite/tests/typecheck/should_fail/all.T b/testsuite/tests/typecheck/should_fail/all.T
index 5fbbee0..07a893b 100644
--- a/testsuite/tests/typecheck/should_fail/all.T
+++ b/testsuite/tests/typecheck/should_fail/all.T
@@ -455,3 +455,4 @@ test('T13902', normal, compile_fail, [''])
 test('T11963', normal, compile_fail, [''])
 test('T14000', normal, compile_fail, [''])
 test('T14055', normal, compile_fail, [''])
+test('T14232', normal, compile_fail, [''])



More information about the ghc-commits mailing list