diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2017-01-31 15:50:38 -0500 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2017-01-31 15:50:38 -0500 |
| commit | 88a253c64dc148a6f09e4e872e3abbcd37fcc18a (patch) | |
| tree | 09250f1da80d3f0afb82c38e76dec9dad3969403 /std/io.zig | |
| parent | b258fdb532a36f8ee9f091ac588a6189bad81acd (diff) | |
| download | zig-88a253c64dc148a6f09e4e872e3abbcd37fcc18a.tar.gz zig-88a253c64dc148a6f09e4e872e3abbcd37fcc18a.zip | |
fix crash when passing void to var args function
closes #235
Diffstat (limited to 'std/io.zig')
| -rw-r--r-- | std/io.zig | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/std/io.zig b/std/io.zig index 9da4c17b16..d4edc89981 100644 --- a/std/io.zig +++ b/std/io.zig @@ -165,6 +165,8 @@ pub const OutStream = struct { } else if (@canImplicitCast([]const u8, value)) { const casted_value = ([]const u8)(value); return self.write(casted_value); + } else if (T == void) { + return self.write("void"); } else { @compileError("Unable to print type '" ++ @typeName(T) ++ "'"); } |
