-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorfrontendTokenization, parsing, AstGen, Sema, and Liveness.Tokenization, parsing, AstGen, Sema, and Liveness.
Milestone
Description
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"),
...
Metadata
Metadata
Assignees
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorfrontendTokenization, parsing, AstGen, Sema, and Liveness.Tokenization, parsing, AstGen, Sema, and Liveness.