Skip to content

Commit 15f40d9

Browse files
authored
Merge pull request ikskuh#10 from linusg/typeinfo
Update std.builtin.Type field names
2 parents 33851c7 + 4f4fcf7 commit 15f40d9

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
zig-cache/
1+
.zig-cache/
22
zig-out/

any-pointer.zig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,12 @@ const TypeId = enum(usize) {
104104

105105
fn assertPointer(comptime T: type) void {
106106
comptime var ti: std.builtin.Type = @typeInfo(T);
107-
if (ti == .Optional) {
108-
ti = @typeInfo(ti.Optional.child);
107+
if (ti == .optional) {
108+
ti = @typeInfo(ti.optional.child);
109109
}
110-
if (ti != .Pointer)
110+
if (ti != .pointer)
111111
@compileError("any-pointer only works with (optional) pointers to one or many.");
112-
switch (ti.Pointer.size) {
112+
switch (ti.pointer.size) {
113113
.One, .Many, .C => {},
114114
else => @compileError("any-pointer only works with (optional) pointers to one or many."),
115115
}

0 commit comments

Comments
 (0)