From 6a173f8195975bdf8aeb5f09507d71dcabb6a532 Mon Sep 17 00:00:00 2001 From: simonpj <unknown> Date: Tue, 18 Jul 2000 14:46:48 +0000 Subject: [PATCH] [project @ 2000-07-18 14:46:48 by simonpj] Add type-sig test --- ghc/tests/rename/should_fail/rnfail023.hs | 15 +++++++++++++++ ghc/tests/rename/should_fail/rnfail023.stderr | 9 +++++++++ 2 files changed, 24 insertions(+) create mode 100644 ghc/tests/rename/should_fail/rnfail023.hs create mode 100644 ghc/tests/rename/should_fail/rnfail023.stderr diff --git a/ghc/tests/rename/should_fail/rnfail023.hs b/ghc/tests/rename/should_fail/rnfail023.hs new file mode 100644 index 000000000000..bf7c4a2f2075 --- /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 000000000000..2725fe6f0b0e --- /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 + -- GitLab