Test pushing into conditionals
authorRichard Eisenberg <eir@cis.upenn.edu>
Wed, 5 Aug 2015 17:17:38 +0000 (13:17 -0400)
committerRichard Eisenberg <eir@cis.upenn.edu>
Wed, 5 Aug 2015 17:17:38 +0000 (13:17 -0400)
testsuite/tests/typecheck/should_compile/PushHRIf.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_compile/all.T

diff --git a/testsuite/tests/typecheck/should_compile/PushHRIf.hs b/testsuite/tests/typecheck/should_compile/PushHRIf.hs
new file mode 100644 (file)
index 0000000..f683913
--- /dev/null
@@ -0,0 +1,7 @@
+{-# LANGUAGE RankNTypes #-}
+
+module PushHRIf where
+
+foo = (if True then id else id) :: forall a. a -> a
+
+bar = (foo 'x', foo True)
index 0b014c4..b334b00 100644 (file)
@@ -468,3 +468,4 @@ test('T10564', normal, compile, [''])
 test('Vta1', normal, compile, [''])
 test('Vta2', normal, compile, [''])
 test('VtaInvis', normal, compile, [''])
+test('PushHRIf', normal, compile, [''])