-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Open
Labels
error messageThis issue points out an error message that is unhelpful and should be improved.This issue points out an error message that is unhelpful and should be improved.frontendTokenization, parsing, AstGen, Sema, and Liveness.Tokenization, parsing, AstGen, Sema, and Liveness.
Milestone
Description
Zig Version
0.15.0-dev.762+3208c80f2
Steps to Reproduce and Observed Output
||
is often mistakenly used instead of or
by newcomers to zig
pub fn main() void {
var foo = true;
_ = &foo;
_ = foo || foo;
}
a.zig:4:9: error: unable to resolve comptime value
_ = foo || foo;
^~~
a.zig:4:9: note: types must be comptime-known
this gives no real explanation as to why anything needs to be comptime since type
seemingly isn't used
Expected Output
the error should give a more helpful message similar to here in the runtime case
myclevorname, BraynStorm, sfiedler0, 190n and NoReligion
Metadata
Metadata
Assignees
Labels
error messageThis issue points out an error message that is unhelpful and should be improved.This issue points out an error message that is unhelpful and should be improved.frontendTokenization, parsing, AstGen, Sema, and Liveness.Tokenization, parsing, AstGen, Sema, and Liveness.