summaryrefslogtreecommitdiff
path: root/testsuite/tests/rep-poly/T20277.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/rep-poly/T20277.hs')
-rw-r--r--testsuite/tests/rep-poly/T20277.hs14
1 files changed, 14 insertions, 0 deletions
diff --git a/testsuite/tests/rep-poly/T20277.hs b/testsuite/tests/rep-poly/T20277.hs
new file mode 100644
index 0000000000..539332bee7
--- /dev/null
+++ b/testsuite/tests/rep-poly/T20277.hs
@@ -0,0 +1,14 @@
+{-# LANGUAGE MagicHash #-}
+{-# LANGUAGE PolyKinds #-}
+{-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE UnboxedTuples #-}
+
+module T20277 where
+
+import GHC.Exts
+
+-- This one crucially must cause an error,
+-- even though there are no representation-polymorphic values.
+-- See GHC ticket #20277.
+baz :: forall (rep :: RuntimeRep) (a :: TYPE rep). () -> (# Int# | a #)
+baz _ = (# 17# | #)