summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2015-12-22 15:49:24 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2015-12-23 07:46:37 +0000
commited213ead5e92aa3c2ae830a00f06684a1028d3ad (patch)
tree021db12e4f775701b683dd2e74b67a6990222d08
parent6eb9dc9cf44794e772fc09695bdbe62bb9c9216b (diff)
downloadhaskell-ed213ead5e92aa3c2ae830a00f06684a1028d3ad.tar.gz
Test Trac #11274
-rw-r--r--testsuite/tests/typecheck/should_fail/T11274.hs10
-rw-r--r--testsuite/tests/typecheck/should_fail/T11274.stderr5
-rw-r--r--testsuite/tests/typecheck/should_fail/all.T1
3 files changed, 16 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_fail/T11274.hs b/testsuite/tests/typecheck/should_fail/T11274.hs
new file mode 100644
index 0000000000..2109cdfa9c
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/T11274.hs
@@ -0,0 +1,10 @@
+{-# OPTIONS_GHC -fdefer-typed-holes #-}
+
+module T11274 where
+
+data Asd = Asd
+
+someHole = _asd
+
+missingInstance :: Asd -> Asd -> Bool
+missingInstance x y = x == y
diff --git a/testsuite/tests/typecheck/should_fail/T11274.stderr b/testsuite/tests/typecheck/should_fail/T11274.stderr
new file mode 100644
index 0000000000..f73131704a
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/T11274.stderr
@@ -0,0 +1,5 @@
+
+T11274.hs:10:25: error:
+ • No instance for (Eq Asd) arising from a use of ‘==’
+ • In the expression: x == y
+ In an equation for ‘missingInstance’: missingInstance x y = x == y
diff --git a/testsuite/tests/typecheck/should_fail/all.T b/testsuite/tests/typecheck/should_fail/all.T
index 27aa70b3cf..8d8d4306e7 100644
--- a/testsuite/tests/typecheck/should_fail/all.T
+++ b/testsuite/tests/typecheck/should_fail/all.T
@@ -395,3 +395,4 @@ test('CustomTypeErrors02', normal, compile_fail, [''])
test('CustomTypeErrors03', normal, compile_fail, [''])
test('T11112', normal, compile_fail, [''])
test('ClassOperator', normal, compile_fail, [''])
+test('T11274', normal, compile_fail, [''])