summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/backpack/should_fail/bkpfail40.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/MissingDefaultMethodBinding.hs7
-rw-r--r--testsuite/tests/typecheck/should_fail/MissingDefaultMethodBinding.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/all.T1
4 files changed, 13 insertions, 1 deletions
diff --git a/testsuite/tests/backpack/should_fail/bkpfail40.stderr b/testsuite/tests/backpack/should_fail/bkpfail40.stderr
index a2f36dfa8e..f221afc7ba 100644
--- a/testsuite/tests/backpack/should_fail/bkpfail40.stderr
+++ b/testsuite/tests/backpack/should_fail/bkpfail40.stderr
@@ -2,5 +2,5 @@
[1 of 1] Compiling A[sig] ( p/A.hsig, nothing )
bkpfail40.bkp:3:9: error:
- • Illegal default method(s) in class definition of C in hsig file
+ • Illegal default method in class definition of C in hsig file
• In the class declaration for ‘C’
diff --git a/testsuite/tests/typecheck/should_fail/MissingDefaultMethodBinding.hs b/testsuite/tests/typecheck/should_fail/MissingDefaultMethodBinding.hs
new file mode 100644
index 0000000000..6ee4c70691
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/MissingDefaultMethodBinding.hs
@@ -0,0 +1,7 @@
+{-# LANGUAGE DefaultSignatures #-}
+
+module MissingDefaultMethodBinding where
+
+class C a where
+ meth :: a
+ default meth :: Num a => a
diff --git a/testsuite/tests/typecheck/should_fail/MissingDefaultMethodBinding.stderr b/testsuite/tests/typecheck/should_fail/MissingDefaultMethodBinding.stderr
new file mode 100644
index 0000000000..fe752862c1
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/MissingDefaultMethodBinding.stderr
@@ -0,0 +1,4 @@
+
+MissingDefaultMethodBinding.hs:5:1:
+ Class ‘C’ has a generic-default signature without a binding ‘meth’
+ In the class declaration for ‘C’
diff --git a/testsuite/tests/typecheck/should_fail/all.T b/testsuite/tests/typecheck/should_fail/all.T
index 2674798823..51d73be7ed 100644
--- a/testsuite/tests/typecheck/should_fail/all.T
+++ b/testsuite/tests/typecheck/should_fail/all.T
@@ -658,3 +658,4 @@ test('T21327', normal, compile_fail, [''])
test('T21338', normal, compile_fail, [''])
test('T21158', normal, compile_fail, [''])
test('T21583', normal, compile_fail, [''])
+test('MissingDefaultMethodBinding', normal, compile_fail, [''])