From 37a3f8affee823ebbd59ea5819302837e1973146 Mon Sep 17 00:00:00 2001
From: simonm <unknown>
Date: Mon, 10 Nov 1997 17:06:47 +0000
Subject: [PATCH] [project @ 1997-11-10 17:06:45 by simonm] add test for
 declarations of non-existent methods

---
 ghc/tests/typecheck/should_fail/tcfail077.hs     | 8 ++++++++
 ghc/tests/typecheck/should_fail/tcfail077.stderr | 4 ++++
 2 files changed, 12 insertions(+)
 create mode 100644 ghc/tests/typecheck/should_fail/tcfail077.hs
 create mode 100644 ghc/tests/typecheck/should_fail/tcfail077.stderr

diff --git a/ghc/tests/typecheck/should_fail/tcfail077.hs b/ghc/tests/typecheck/should_fail/tcfail077.hs
new file mode 100644
index 000000000000..6070a5b8a517
--- /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 000000000000..4988e5c99b52
--- /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
-- 
GitLab