Created
December 20, 2018 22:33
-
-
Save donpdonp/c520beed5eee8aca2bd732bc875c8c0a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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