summaryrefslogtreecommitdiff
path: root/testsuite/tests
diff options
context:
space:
mode:
authorRichard Eisenberg <rae@cs.brynmawr.edu>2017-03-22 22:32:04 -0400
committerRichard Eisenberg <rae@cs.brynmawr.edu>2017-03-27 15:04:15 -0400
commitcea7141851ce653cb20207da3591d09e73fa396d (patch)
tree379e1f984df117738aa0c6cd99bbd9e966fbf4bd /testsuite/tests
parent5025fe2435d030f0c5ecdc2a933c7bfcb3efcb7c (diff)
downloadhaskell-cea7141851ce653cb20207da3591d09e73fa396d.tar.gz
Fix #13458
Core Lint shouldn't check representations of types that don't have representations. test case: typecheck/should_compile/T13458
Diffstat (limited to 'testsuite/tests')
-rw-r--r--testsuite/tests/typecheck/should_compile/T13458.hs11
-rw-r--r--testsuite/tests/typecheck/should_compile/all.T1
2 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T13458.hs b/testsuite/tests/typecheck/should_compile/T13458.hs
new file mode 100644
index 0000000000..9b51378d65
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T13458.hs
@@ -0,0 +1,11 @@
+{-# LANGUAGE MagicHash, TypeInType, ScopedTypeVariables #-}
+{-# OPTIONS_GHC -O #-}
+module T13458 where
+import GHC.Exts
+import Data.Kind
+import Unsafe.Coerce
+
+unsafeCoerce' :: forall (r :: RuntimeRep)
+ (a :: TYPE r) (b :: TYPE r).
+ a -> b
+unsafeCoerce' = unsafeCoerce id
diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T
index 9caaf2567a..97a5350c7d 100644
--- a/testsuite/tests/typecheck/should_compile/all.T
+++ b/testsuite/tests/typecheck/should_compile/all.T
@@ -546,3 +546,4 @@ test('T12926', normal, compile, [''])
test('T13381', normal, compile_fail, [''])
test('T13337', normal, compile, [''])
test('T13343', normal, compile, [''])
+test('T13458', normal, compile, [''])