summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/T15767.stderr
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2018-10-18 15:41:44 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2018-10-24 16:38:55 +0100
commit6b1102e2cfcffb265fd33cf8a99ab5e6b3f14906 (patch)
tree564e90f34ac188a0fc22390f3975572007cf6b7b /testsuite/tests/typecheck/should_fail/T15767.stderr
parent7d9036448a394d7f2eeb158bb71d0fa694f88f56 (diff)
downloadhaskell-6b1102e2cfcffb265fd33cf8a99ab5e6b3f14906.tar.gz
Report a Wanted error even if there are Given ones
We suppress some Given errors; see Note [Given errors] in TcErrors. But we must be careful not to suppress Wanted errors because of the presence of these Given errors -- else we might allow compilation to bogusly proceed The rubber hits the road in TcRnTypes.insolubleCt, where we don't want to treat Givens as insoluble, nor (and this is the new bit) Deriveds that arise from Givens. See Note [Given insolubles] in TcRnTypes. This fixes #15767.
Diffstat (limited to 'testsuite/tests/typecheck/should_fail/T15767.stderr')
-rw-r--r--testsuite/tests/typecheck/should_fail/T15767.stderr9
1 files changed, 9 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_fail/T15767.stderr b/testsuite/tests/typecheck/should_fail/T15767.stderr
new file mode 100644
index 0000000000..2c20dd200f
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/T15767.stderr
@@ -0,0 +1,9 @@
+
+T15767.hs:7:5: error:
+ • No instance for (C () b) arising from a use of ‘x’
+ • In the expression: x
+ In an equation for ‘y’:
+ y = x
+ where
+ x :: (C () b, C Bool b) => b
+ x = f ()