Test Trac #11274
authorSimon Peyton Jones <simonpj@microsoft.com>
Tue, 22 Dec 2015 15:49:24 +0000 (15:49 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Wed, 23 Dec 2015 07:46:37 +0000 (07:46 +0000)
testsuite/tests/typecheck/should_fail/T11274.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/T11274.stderr [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/all.T

diff --git a/testsuite/tests/typecheck/should_fail/T11274.hs b/testsuite/tests/typecheck/should_fail/T11274.hs
new file mode 100644 (file)
index 0000000..2109cdf
--- /dev/null
@@ -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 (file)
index 0000000..f731317
--- /dev/null
@@ -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
index 27aa70b..8d8d430 100644 (file)
@@ -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, [''])