Skip to content

Instantly share code, notes, and snippets.

/test.zig Secret

Created February 23, 2018 07:57
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 anonymous/2af51c0ea79f62ec565546e9619ef470 to your computer and use it in GitHub Desktop.
Save anonymous/2af51c0ea79f62ec565546e9619ef470 to your computer and use it in GitHub Desktop.
fn get_type(comptime T: type) type { return T; }
pub fn main() void
{
@compileLog(@typeId(get_type(Point))); // | TypeId.Struct
@compileLog(@typeId(@typeOf(Point))); // | TypeId.Type
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment