From: simonm Date: Mon, 10 Nov 1997 17:06:47 +0000 (+0000) Subject: [project @ 1997-11-10 17:06:45 by simonm] X-Git-Tag: Approx_2487_patches~1312 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=37a3f8affee823ebbd59ea5819302837e1973146;p=ghc-hetmet.git [project @ 1997-11-10 17:06:45 by simonm] add test for declarations of non-existent methods --- diff --git a/ghc/tests/typecheck/should_fail/tcfail077.hs b/ghc/tests/typecheck/should_fail/tcfail077.hs new file mode 100644 index 0000000..6070a5b --- /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 0000000..4988e5c --- /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