solidity/test/libsolidity/syntaxTests/structs/calldata_assign.sol

8 lines
192 B
Solidity
Raw Normal View History

pragma experimental ABIEncoderV2;
contract Test {
struct S { int a; }
function f(S calldata s) external { s.a = 4; }
}
// ----
// TypeError: (114-117): Calldata structs are read-only.