Test #8119
authorKrzysztof Gogolewski <krz.gogolewski@gmail.com>
Fri, 18 Oct 2013 23:32:31 +0000 (01:32 +0200)
committerKrzysztof Gogolewski <krz.gogolewski@gmail.com>
Fri, 18 Oct 2013 23:32:31 +0000 (01:32 +0200)
testsuite/tests/typecheck/should_run/T8119.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_run/T8119.script [new file with mode: 0644]
testsuite/tests/typecheck/should_run/T8119.stdout [new file with mode: 0644]

diff --git a/testsuite/tests/typecheck/should_run/T8119.hs b/testsuite/tests/typecheck/should_run/T8119.hs
new file mode 100644 (file)
index 0000000..53e918f
--- /dev/null
@@ -0,0 +1,3 @@
+{-# LANGUAGE TypeFamilies #-}
+class Test a where test :: a
+instance (a ~ Int, b ~ Int) => Test (a -> b) where test = id
diff --git a/testsuite/tests/typecheck/should_run/T8119.script b/testsuite/tests/typecheck/should_run/T8119.script
new file mode 100644 (file)
index 0000000..063b2f6
--- /dev/null
@@ -0,0 +1,3 @@
+:l T8119
+:t test `asTypeOf` (undefined :: a -> b)
+:t \x -> test x
diff --git a/testsuite/tests/typecheck/should_run/T8119.stdout b/testsuite/tests/typecheck/should_run/T8119.stdout
new file mode 100644 (file)
index 0000000..cda6b1d
--- /dev/null
@@ -0,0 +1,2 @@
+test `asTypeOf` (undefined :: a -> b) :: Int -> Int
+\x -> test x :: Int -> Int