Zig Version
0.10.0-dev.1983+c5e847744
Steps to Reproduce
// test.zig
pub fn S() type {
return struct {};
}
test "" {
_ = [0]S;
}
$ stage2/zig test test.zig
Expected Behavior
A compile error along the lines of error: expected type, found fn() type
Actual Behavior
$ stage2/zig test test.zig
thread 226457 panic: zig compiler bug: NeededSourceLocation
...
zig/src/Module.zig:4923:39: 0x2faac63 in Module.analyzeFnBody (zig)
error.NeededSourceLocation => @panic("zig compiler bug: NeededSourceLocation"),
...
Zig Version
0.10.0-dev.1983+c5e847744
Steps to Reproduce
Expected Behavior
A compile error along the lines of
error: expected type, found fn() typeActual Behavior