mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
force () in complex bool expressions: (a && b) || c instead of a && b || c
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
const (
|
||||
a = 3
|
||||
u = u64(1)
|
||||
)
|
||||
|
||||
fn test_const() {
|
||||
b := (true && true) || false
|
||||
assert b == true
|
||||
assert a == 3
|
||||
assert u == u64(1)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user