From 8ba0b0fbe695de145b82361facf52b07f1ff4737 Mon Sep 17 00:00:00 2001
From: simonm <unknown>
Date: Thu, 12 Feb 1998 14:19:13 +0000
Subject: [PATCH] [project @ 1998-02-12 14:19:12 by simonm] test for newtype
 declaration with an unboxed field.

---
 ghc/tests/typecheck/should_fail/tcfail079.hs     | 11 +++++++++++
 ghc/tests/typecheck/should_fail/tcfail079.stderr |  7 +++++++
 2 files changed, 18 insertions(+)
 create mode 100644 ghc/tests/typecheck/should_fail/tcfail079.hs
 create mode 100644 ghc/tests/typecheck/should_fail/tcfail079.stderr

diff --git a/ghc/tests/typecheck/should_fail/tcfail079.hs b/ghc/tests/typecheck/should_fail/tcfail079.hs
new file mode 100644
index 000000000000..273ddfc078db
--- /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 000000000000..c25c1ba542cf
--- /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
-- 
GitLab