Skip to content

Commit

Permalink
Fix example runner
Browse files Browse the repository at this point in the history
  • Loading branch information
Luukdegram committed Dec 22, 2020
1 parent 5778c16 commit 82a1d1b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/example_runner.zig
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pub fn main() !void {
const source = try file.readToEndAlloc(allocator, size);
defer allocator.free(source);

const writer = std.io.getStdErr().writer();
const writer = std.io.getStdOut().writer();
var vm = try luf.Vm.init(allocator);
defer vm.deinit();
vm.compileAndRun(source) catch |err| {
Expand Down
2 changes: 1 addition & 1 deletion src/Value.zig
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ pub fn print(self: *Value, writer: anytype) @TypeOf(writer).Error!void {
},
.optional => {
if (self.toOptional().child) |child|
try self.print(child)
try child.print(writer)
else
try writer.writeAll("nil");
},
Expand Down

0 comments on commit 82a1d1b

Please sign in to comment.