diff --git a/ghc/tests/typecheck/should_fail/tcfail077.hs b/ghc/tests/typecheck/should_fail/tcfail077.hs
new file mode 100644
index 0000000000000000000000000000000000000000..6070a5b8a517e17a340c1912b4afb4f85330d89c
--- /dev/null
+++ b/ghc/tests/typecheck/should_fail/tcfail077.hs
@@ -0,0 +1,8 @@
+module ShouldFail where
+
+--!!! declaring a default method in a class that doesn't have that method.
+
+class Foo a where
+  op :: a -> a
+
+  op2 x = x	-- Bogus declaration
diff --git a/ghc/tests/typecheck/should_fail/tcfail077.stderr b/ghc/tests/typecheck/should_fail/tcfail077.stderr
new file mode 100644
index 0000000000000000000000000000000000000000..4988e5c99b527d350a9eb4fc10cc5f49589316a7
--- /dev/null
+++ b/ghc/tests/typecheck/should_fail/tcfail077.stderr
@@ -0,0 +1,4 @@
+ 
+tcfail077.hs:8: Class `Foo' does not have a method `op2'
+
+Compilation had errors