From: simonm Date: Thu, 12 Feb 1998 14:19:13 +0000 (+0000) Subject: [project @ 1998-02-12 14:19:12 by simonm] X-Git-Tag: Approx_2487_patches~962 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=8ba0b0fbe695de145b82361facf52b07f1ff4737;p=ghc-hetmet.git [project @ 1998-02-12 14:19:12 by simonm] test for newtype declaration with an unboxed field. --- diff --git a/ghc/tests/typecheck/should_fail/tcfail079.hs b/ghc/tests/typecheck/should_fail/tcfail079.hs new file mode 100644 index 0000000..273ddfc --- /dev/null +++ b/ghc/tests/typecheck/should_fail/tcfail079.hs @@ -0,0 +1,11 @@ +{-# OPTIONS -fglasgow-exts #-} + +module ShouldFail where + +--!!! unboxed field in newtype declaration + +import GlaExts ( Int# ) + +newtype Unboxed = Unboxed Int# + +f = [ Unboxed 1#, Unboxed 2# ] -- shouldn't be allowed! diff --git a/ghc/tests/typecheck/should_fail/tcfail079.stderr b/ghc/tests/typecheck/should_fail/tcfail079.stderr new file mode 100644 index 0000000..c25c1ba --- /dev/null +++ b/ghc/tests/typecheck/should_fail/tcfail079.stderr @@ -0,0 +1,7 @@ + +tcfail079.hs:9: + Newtype constructor field has an unboxed type: `Int#' + In the newtype declaration for `Unboxed' + + +Compilation had errors