progress on struct support

This commit is contained in:
Andrew Kelley
2015-12-12 02:34:09 -07:00
parent ac630d354d
commit 38f12adbda
3 changed files with 40 additions and 8 deletions

View File

@@ -2,6 +2,8 @@ export executable "structs";
use "std.zig";
// Note: this example is not working because codegen is confused about
// how byvalue structs which are in memory on the stack work
export fn main(argc : isize, argv : *mut *mut u8, env : *mut *mut u8) -> i32 {
let mut foo : Foo;
@@ -22,6 +24,6 @@ struct Foo {
fn test_foo(foo : Foo) {
if foo.b {
print_str("OK");
print_str("OK" as string);
}
}