Add control flow tests for "and" and "or" operators

This commit is contained in:
wechman
2022-09-28 13:06:25 +02:00
parent 43a612e420
commit 1084a34f28
8 changed files with 90 additions and 65 deletions
@@ -0,0 +1,11 @@
struct S { bool f; }
contract C {
function f() public view {
S storage s;
s.f && true;
}
}
// ----
// TypeError 3464: (95-96): This variable is of storage pointer type and can be accessed without prior assignment, which would lead to undefined behaviour.
@@ -0,0 +1,11 @@
struct S { bool f; }
contract C {
function f() public view {
S storage s;
s.f || true;
}
}
// ----
// TypeError 3464: (95-96): This variable is of storage pointer type and can be accessed without prior assignment, which would lead to undefined behaviour.