zig
zig copied to clipboard
stage2: error when reifying Fn type via @Type
Zig Version
0.10.0-dev.3355+dfc7493dc
Steps to Reproduce
The below code compiles and runs as expected on stage1, however the build fails on stage2:
const std = @import("std");
pub fn main() anyerror!void {
const fn_info = std.builtin.Type{
.Fn = .{
.calling_convention = .C,
.alignment = 0,
.is_generic = false,
.is_var_args = false,
.return_type = void,
.args = &.{}
}
};
const fn_type = @Type(fn_info);
try std.testing.expectEqual(fn() callconv(.C) void, fn_type);
}
zig build run
Expected Behavior
compile and run with the test passing.
Actual Behavior
stage1 works flawlessly, however stage2 outputs the following error when attempting to build:
error: TODO: Sema.zirReify for Fn
const fn_type = @Type(fn_info);
^~~~~~~~~~~~~~
if it is not worthwhile for me to file bugs of this sort (stage1/2 behavior differences) plz let me know :)