summaryrefslogtreecommitdiff
path: root/ghc/tests/rename/should_fail
diff options
context:
space:
mode:
authorsimonpj <unknown>2000-07-18 14:46:48 +0000
committersimonpj <unknown>2000-07-18 14:46:48 +0000
commit6a173f8195975bdf8aeb5f09507d71dcabb6a532 (patch)
tree6d8c42a3e8308e1f9d3bfd9a0766aff474135b10 /ghc/tests/rename/should_fail
parent5662e0a112622c96fe38fd28567df452285a4592 (diff)
downloadhaskell-6a173f8195975bdf8aeb5f09507d71dcabb6a532.tar.gz
[project @ 2000-07-18 14:46:48 by simonpj]
Add type-sig test
Diffstat (limited to 'ghc/tests/rename/should_fail')
-rw-r--r--ghc/tests/rename/should_fail/rnfail023.hs15
-rw-r--r--ghc/tests/rename/should_fail/rnfail023.stderr9
2 files changed, 24 insertions, 0 deletions
diff --git a/ghc/tests/rename/should_fail/rnfail023.hs b/ghc/tests/rename/should_fail/rnfail023.hs
new file mode 100644
index 0000000000..bf7c4a2f20
--- /dev/null
+++ b/ghc/tests/rename/should_fail/rnfail023.hs
@@ -0,0 +1,15 @@
+-- !!! Check that type signatures and pragmas that
+-- !!! don't have a "parent" are correctly reported
+
+module ShouldFail where
+
+-- Top level test
+f :: Int -> Int
+{-# INLINE f #-}
+
+-- Nested test
+h :: Int -> Int -- This one is ok
+h x = x
+ where
+ g :: Int -> Int -- Bogus
+
diff --git a/ghc/tests/rename/should_fail/rnfail023.stderr b/ghc/tests/rename/should_fail/rnfail023.stderr
new file mode 100644
index 0000000000..2725fe6f0b
--- /dev/null
+++ b/ghc/tests/rename/should_fail/rnfail023.stderr
@@ -0,0 +1,9 @@
+
+rnfail023.hs:7: Variable not in scope: `f'
+
+rnfail023.hs:8: Variable not in scope: `f'
+
+rnfail023.hs:14: Variable not in scope: `g'
+
+Compilation had errors
+