Skip to content

Instantly share code, notes, and snippets.

@Hejsil
Created September 28, 2018 21:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Hejsil/0cb369eb11b942e23db6f799d5af675f to your computer and use it in GitHub Desktop.
Save Hejsil/0cb369eb11b942e23db6f799d5af675f to your computer and use it in GitHub Desktop.
const builtin = @import("builtin");
const TypeInfo = builtin.TypeInfo;
pub fn a(comptime info: TypeInfo) type {
return void;
}
test "a" {
// zig/src/analyze.cpp:4915: bool can_mutate_comptime_var_state(ConstExprValue*): Assertion `value != nullptr' failed.
_ = a(@typeInfo(type));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment