solidity/test/libsolidity/syntaxTests/controlFlow/uninitializedAccess/modifier_order_fail.sol
2022-04-01 23:41:18 -05:00

9 lines
358 B
Solidity

contract C {
modifier m1(uint[] storage a) { _; }
modifier m2(uint[] storage a) { _; }
uint[] s;
function f() m1(b) m2(b = s) internal view returns (uint[] storage b) {}
}
// ----
// TypeError 3464: (129-130='b'): This variable is of storage pointer type and can be accessed without prior assignment, which would lead to undefined behaviour.