Skip to content

Instantly share code, notes, and snippets.

@lmb
Created July 17, 2018 16:56
Show Gist options
  • Save lmb/cc1f03437b78be4be65543c7ba57875c to your computer and use it in GitHub Desktop.
Save lmb/cc1f03437b78be4be65543c7ba57875c to your computer and use it in GitHub Desktop.
zig generics segfault
pub fn Generic(comptime len: usize) var {
return struct {
stack: [len]u8,
};
}
const Thing = Generic(1);
test "crash" {
Thing.bloop();
}
@lmb
Copy link
Author

lmb commented Jul 17, 2018

$ zig version
0.2.0+363f4fac

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment