parseh: correct debug for forward decls

also C typedefs emit simply `const Foo = Bar;`
since in C you can implicitly cast from a typedef
child to parent but in zig you can't.
This commit is contained in:
Andrew Kelley
2016-01-31 17:48:19 -07:00
parent 773cd851fe
commit 41b95cc237
4 changed files with 33 additions and 5 deletions

View File

@@ -2046,8 +2046,8 @@ typedef void Foo;
Foo fun(Foo *a);
)SOURCE", 3,
"pub type c_void = u8;",
"pub type Foo = c_void;",
"pub extern fn fun(a: ?&Foo);");
"pub const Foo = c_void;",
"pub extern fn fun(a: ?&c_void);");
}
static void print_compiler_invocation(TestCase *test_case) {