solidity/test/libsolidity/syntaxTests/lvalues/calldata_member_access.sol

10 lines
216 B
Solidity
Raw Normal View History

pragma experimental ABIEncoderV2;
contract C {
struct S { uint256 x; }
function f(S calldata s) external pure {
s.x = 42;
}
}
// ----
// TypeError 4156: (128-131): Calldata structs are read-only.