2018-08-02 16:55:06 +00:00
|
|
|
contract C {
|
|
|
|
struct S { bool f; }
|
|
|
|
S s;
|
|
|
|
function f() internal view returns (S storage c) {
|
|
|
|
false && (c = s).f;
|
|
|
|
}
|
|
|
|
function g() internal view returns (S storage c) {
|
|
|
|
true || (c = s).f;
|
|
|
|
}
|
|
|
|
function h() internal view returns (S storage c) {
|
|
|
|
// expect error, although this is always fine
|
|
|
|
true && (false || (c = s).f);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// ----
|
2018-12-07 17:20:35 +00:00
|
|
|
// TypeError: (87-98): This variable is of storage pointer type and can be returned without prior assignment.
|
|
|
|
// TypeError: (176-187): This variable is of storage pointer type and can be returned without prior assignment.
|
|
|
|
// TypeError: (264-275): This variable is of storage pointer type and can be returned without prior assignment.
|