commit 2b1695b1b03b42719f02c4ed4d4b5d3495a2ca3a (tree)
parent 86f362ce8e878188d40393e6f2feba0c60ddbcf0
Author: Andrew Kelley <andrew@ziglang.org>
Date: Sat, 22 Jun 2019 18:54:27 -0400
fix std.json regression
Diffstat:
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/std/json.zig b/std/json.zig
@@ -876,8 +876,9 @@ pub const TokenStream = struct {
pub fn next(self: *TokenStream) !?Token {
if (self.token) |token| {
+ const copy = token;
self.token = null;
- return token;
+ return copy;
}
var t1: ?Token = undefined;
diff --git a/std/std.zig b/std/std.zig
@@ -90,7 +90,7 @@ test "std" {
_ = @import("hash.zig");
_ = @import("heap.zig");
_ = @import("io.zig");
- //_ = @import("json.zig");
+ _ = @import("json.zig");
//_ = @import("lazy_init.zig");
_ = @import("macho.zig");
_ = @import("math.zig");