Commit 9a3c8740 authored by Ian Lynagh's avatar Ian Lynagh

Add a test for FFI decl parsing

We were parsing "staticfoo" as "static foo".
parent ab91cded
......@@ -201,3 +201,8 @@ test('Capi_Ctype_002',
run_command,
['$MAKE -s --no-print-directory Capi_Ctype_002'])
test('ffi_parsing_001',
extra_clean(['ffi_parsing_001_c.o']),
compile_and_run,
['ffi_parsing_001_c.c'])
import Foreign.C
-- This should not be parsed as "static foo", importing "foo"
foreign import ccall "staticfoo" x :: CInt
main :: IO ()
main = print x
int staticfoo(void) {
return 5;
}
int foo(void) {
return 8;
}
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