Skip to content

Instantly share code, notes, and snippets.

@donpdonp
Created December 20, 2018 22:33
Show Gist options
  • Save donpdonp/c520beed5eee8aca2bd732bc875c8c0a to your computer and use it in GitHub Desktop.
Save donpdonp/c520beed5eee8aca2bd732bc875c8c0a to your computer and use it in GitHub Desktop.
const Module = struct {
sp: i32,
memory: Memory,
};
const Memory = struct {
ram: []i32,
};
pub fn main() void {
var module = Module { .sp = 0, .memory = null};
}
$ zig build-exe struct.zig
/tmp/struct.zig:13:43: error: expected type 'Memory', found '(null)'
var module = Module { .sp = 0, .memory = null};
^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment