diff options
author | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2023-03-21 22:09:11 +0100 |
---|---|---|
committer | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2023-04-15 14:35:53 +0200 |
commit | 0da18eb79540181ae9835e73d52ba47ec79fff6b (patch) | |
tree | 6f1bbdf5480f88d6e0d0e1c23c417593ae49ec5f /testsuite | |
parent | 2c04024617f1ee4c76844cfe0a886bab87c23bd0 (diff) | |
download | haskell-0da18eb79540181ae9835e73d52ba47ec79fff6b.tar.gz |
Show an error when we cannot default a concrete tyvar
Fixes #23153
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/rep-poly/T23153.hs | 8 | ||||
-rw-r--r-- | testsuite/tests/rep-poly/T23153.stderr | 15 | ||||
-rw-r--r-- | testsuite/tests/rep-poly/all.T | 1 |
3 files changed, 24 insertions, 0 deletions
diff --git a/testsuite/tests/rep-poly/T23153.hs b/testsuite/tests/rep-poly/T23153.hs new file mode 100644 index 0000000000..06b2ea3a03 --- /dev/null +++ b/testsuite/tests/rep-poly/T23153.hs @@ -0,0 +1,8 @@ +module T23153 where + +import GHC.Exts + +f :: forall r s (a :: TYPE (r s)). a -> () +f = f + +g h = f (h ()) diff --git a/testsuite/tests/rep-poly/T23153.stderr b/testsuite/tests/rep-poly/T23153.stderr new file mode 100644 index 0000000000..9350f4277b --- /dev/null +++ b/testsuite/tests/rep-poly/T23153.stderr @@ -0,0 +1,15 @@ + +T23153.hs:8:1: error: [GHC-52083] + The argument ‘(h ())’ of ‘f’ + cannot be assigned a fixed runtime representation, not even by defaulting. + Suggested fix: Add a type signature. + +T23153.hs:8:1: error: [GHC-52083] + The argument ‘(h ())’ of ‘f’ + cannot be assigned a fixed runtime representation, not even by defaulting. + Suggested fix: Add a type signature. + +T23153.hs:8:1: error: [GHC-52083] + The argument ‘(h ())’ of ‘f’ + cannot be assigned a fixed runtime representation, not even by defaulting. + Suggested fix: Add a type signature. diff --git a/testsuite/tests/rep-poly/all.T b/testsuite/tests/rep-poly/all.T index a01a2529ae..a05a6bb7e5 100644 --- a/testsuite/tests/rep-poly/all.T +++ b/testsuite/tests/rep-poly/all.T @@ -116,3 +116,4 @@ test('T21650_b', normal, compile_fail, ['-Wno-deprecated-flags']) ## test('T23051', normal, compile_fail, ['']) +test('T23153', normal, compile_fail, ['']) |