Fix build_runner.zig

This commit is contained in:
Alexandros Naskos 2020-10-04 17:08:49 +03:00
parent 4f636649a5
commit c1d7f0ffa7

View File

@ -60,7 +60,7 @@ fn processPackage(out_stream: anytype, pkg: Pkg) anyerror!void {
} }
fn runBuild(builder: *Builder) anyerror!void { fn runBuild(builder: *Builder) anyerror!void {
switch (@typeInfo(@TypeOf(root.build).ReturnType)) { switch (@typeInfo(@typeInfo(@TypeOf(root.build)).Fn.return_type.?)) {
.Void => root.build(builder), .Void => root.build(builder),
.ErrorUnion => try root.build(builder), .ErrorUnion => try root.build(builder),
else => @compileError("expected return type of build to be 'void' or '!void'"), else => @compileError("expected return type of build to be 'void' or '!void'"),