diff options
| author | Jimmi Holst Christensen <rainbowhejsil@gmail.com> | 2018-04-12 18:56:58 +0200 |
|---|---|---|
| committer | Jimmi Holst Christensen <rainbowhejsil@gmail.com> | 2018-04-12 18:56:58 +0200 |
| commit | fad54e62bb58937e82e5ca9c58b8b2066559e849 (patch) | |
| tree | e59517fe68cc995c734268f9d743276b7e52a791 /std | |
| parent | d35a6655e0d1f5f75d882dbcd6f0e9f232a4bc24 (diff) | |
| download | zig-fad54e62bb58937e82e5ca9c58b8b2066559e849.tar.gz zig-fad54e62bb58937e82e5ca9c58b8b2066559e849.zip | |
std.zig.ast: Fixed build failures
Diffstat (limited to 'std')
| -rw-r--r-- | std/zig/ast.zig | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/std/zig/ast.zig b/std/zig/ast.zig index ca1d983ac8..17a19e6213 100644 --- a/std/zig/ast.zig +++ b/std/zig/ast.zig @@ -289,7 +289,7 @@ pub const NodeErrorSetDecl = struct { pub fn iterate(self: &NodeErrorSetDecl, index: usize) ?&Node { var i = index; - if (i < self.decls.len) return &self.decls.at(i).base; + if (i < self.decls.len) return self.decls.at(i); i -= self.decls.len; return null; @@ -763,7 +763,7 @@ pub const NodeElse = struct { var i = index; if (self.payload) |payload| { - if (i < 1) return &payload.base; + if (i < 1) return payload; i -= 1; } @@ -823,7 +823,7 @@ pub const NodeSwitchCase = struct { i -= self.items.len; if (self.payload) |payload| { - if (i < 1) return &payload.base; + if (i < 1) return payload; i -= 1; } @@ -877,7 +877,7 @@ pub const NodeWhile = struct { i -= 1; if (self.payload) |payload| { - if (i < 1) return &payload.base; + if (i < 1) return payload; i -= 1; } @@ -935,7 +935,7 @@ pub const NodeFor = struct { i -= 1; if (self.payload) |payload| { - if (i < 1) return &payload.base; + if (i < 1) return payload; i -= 1; } @@ -986,7 +986,7 @@ pub const NodeIf = struct { i -= 1; if (self.payload) |payload| { - if (i < 1) return &payload.base; + if (i < 1) return payload; i -= 1; } @@ -1076,7 +1076,7 @@ pub const NodeInfixOp = struct { switch (self.op) { InfixOp.Catch => |maybe_payload| { if (maybe_payload) |payload| { - if (i < 1) return &payload.base; + if (i < 1) return payload; i -= 1; } }, @@ -1413,7 +1413,7 @@ pub const NodeSuspend = struct { var i = index; if (self.payload) |payload| { - if (i < 1) return &payload.base; + if (i < 1) return payload; i -= 1; } |
