Add some parenthesis.
With the upcoming expression changes we need to put parenthesis around boolean expressions which mix `&&` and `||`. Bug: tint:1633 Change-Id: I7a304e5a23998d9977630c2d4466312be7ae169e Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/99862 Commit-Queue: Dan Sinclair <dsinclair@chromium.org> Reviewed-by: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
parent
e76521153f
commit
96a7d5a6bd
|
@ -1639,7 +1639,7 @@ fn f() {
|
||||||
var b = true;
|
var b = true;
|
||||||
var c = true;
|
var c = true;
|
||||||
var d = true;
|
var d = true;
|
||||||
let r = b && a(0) || c && a(1) && c && d || a(2);
|
let r = (b && a(0)) || (c && a(1) && c && d) || a(2);
|
||||||
}
|
}
|
||||||
)";
|
)";
|
||||||
|
|
||||||
|
@ -1869,7 +1869,7 @@ fn a(i : i32) -> bool {
|
||||||
|
|
||||||
fn f() {
|
fn f() {
|
||||||
var b = true;
|
var b = true;
|
||||||
let r = bool(a(0)) && bool(a(1) && b) || bool(a(2) && a(3));
|
let r = (bool(a(0)) && bool(a(1) && b)) || bool(a(2) && a(3));
|
||||||
}
|
}
|
||||||
)";
|
)";
|
||||||
|
|
||||||
|
@ -1916,7 +1916,7 @@ fn a(i : i32) -> i32 {
|
||||||
|
|
||||||
fn f() {
|
fn f() {
|
||||||
var b = true;
|
var b = true;
|
||||||
let r = bool(a(0)) && bool(a(1)) || b;
|
let r = (bool(a(0)) && bool(a(1))) || b;
|
||||||
}
|
}
|
||||||
)";
|
)";
|
||||||
|
|
||||||
|
@ -1994,7 +1994,7 @@ fn a(i : i32) -> bool {
|
||||||
|
|
||||||
fn f() {
|
fn f() {
|
||||||
var b = true;
|
var b = true;
|
||||||
let r = all(a(0)) && all(a(1) && b) || all(a(2) && a(3));
|
let r = (all(a(0)) && all(a(1) && b)) || all(a(2) && a(3));
|
||||||
}
|
}
|
||||||
)";
|
)";
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue