-
-
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.12.0-dev.2158+4f2009de1
Steps to Reproduce and Observed Behavior
When I accidentally used a field name as a method it caused the compiler to segfault:
// /tmp/tmp.zig
const U = union(enum) {
int: isize,
float: f64,
};
test {
const f = U{ .float = 20 };
std.debug.print("{}\n", .{f.int()});
}/tmp $ zig test /tmp/tmp.zig
Segmentation fault (core dumped)Expected Behavior
some kind of error message and no segfault
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.