Meg's Mirrors
zig
about
heads
tags
log
tree
search
Search
zig
test
cases
compile_errors
if_condition_is_bool_not_int.zig
pretty
plain
permalink
blame
history
•
12 lines
•
221 B
1
export fn foo() void {
2
if (0) {}
3
}
4
5
export fn bar() void {
6
comptime if (0) {};
7
}
8
9
// error
10
//
11
// :2:9: error: expected type 'bool', found 'comptime_int'
12
// :6:18: error: expected type 'bool', found 'comptime_int'