[project @ 2000-07-18 14:46:48 by simonpj]
authorsimonpj <unknown>
Tue, 18 Jul 2000 14:46:48 +0000 (14:46 +0000)
committersimonpj <unknown>
Tue, 18 Jul 2000 14:46:48 +0000 (14:46 +0000)
Add type-sig test

ghc/tests/rename/should_fail/rnfail023.hs [new file with mode: 0644]
ghc/tests/rename/should_fail/rnfail023.stderr [new file with mode: 0644]

diff --git a/ghc/tests/rename/should_fail/rnfail023.hs b/ghc/tests/rename/should_fail/rnfail023.hs
new file mode 100644 (file)
index 0000000..bf7c4a2
--- /dev/null
@@ -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 (file)
index 0000000..2725fe6
--- /dev/null
@@ -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
+