diff --git a/ghc/tests/typecheck/should_fail/tcfail079.hs b/ghc/tests/typecheck/should_fail/tcfail079.hs new file mode 100644 index 0000000000000000000000000000000000000000..273ddfc078dba088ffc3010b397bed2327369427 --- /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 0000000000000000000000000000000000000000..c25c1ba542cfb2983082983dd9463179e2f680fe --- /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