Commit 9228ed44 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Add a test for trac #2033: view pattern where expression expected

parent 9b760138
......@@ -52,3 +52,5 @@ test('rnfail047', normal, multimod_compile_fail, ['rnfail047', '-v0'])
test('rnfail048', normal, compile_fail, [''])
test('rnfail049', if_compiler_lt('ghc', '6.9', skip), compile_fail, [''])
test('rnfail050', if_compiler_lt('ghc', '6.9', skip), compile_fail, [''])
test('rnfail051', if_compiler_lt('ghc', '6.9', skip), compile_fail, [''])
-- trac #2033: This used to fail when the renamer didn't check for a view
-- /pattern/ being used in an /expression/ context
module RnFail051 where
main :: IO ()
main = wrapper (_ -> putStrLn "_")
wrapper :: (String -> IO ()) -> IO ()
wrapper f = f ""
rnfail051.hs:7:16:
Pattern syntax in expression context: _ -> putStrLn "_"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment