aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-12-09 13:30:53 -0500
committerAndrew Kelley <andrew@ziglang.org>2019-12-09 13:30:53 -0500
commit5d82744f1cb3ea66c20fc377d0237a50ccbcf81e (patch)
treea5da5c96fe71492cbf5d29a2e96b6cfe45a3793e /lib
parent640e09183d3100c477a26c6cdc26f1eae31472a1 (diff)
downloadzig-5d82744f1cb3ea66c20fc377d0237a50ccbcf81e.tar.gz
zig-5d82744f1cb3ea66c20fc377d0237a50ccbcf81e.zip
ability to give comptime and non-comptime types to same parameter
Diffstat (limited to 'lib')
-rw-r--r--lib/std/fmt.zig1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/std/fmt.zig b/lib/std/fmt.zig
index a0871d52a6..f557e716a5 100644
--- a/lib/std/fmt.zig
+++ b/lib/std/fmt.zig
@@ -469,6 +469,7 @@ pub fn formatType(
.Fn => {
return format(context, Errors, output, "{}@{x}", .{ @typeName(T), @ptrToInt(value) });
},
+ .Type => return output(context, @typeName(T)),
else => @compileError("Unable to format type '" ++ @typeName(T) ++ "'"),
}
}