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

9 lines
303 B
Solidity
Raw Normal View History

pragma experimental ABIEncoderV2;
contract Test {
struct S { int a; }
function f(S calldata s) external { s.a = 4; }
}
// ----
// Warning: (0-33): Experimental features are turned on. Do not use experimental features on live deployments.
// TypeError: (114-117): Calldata structs are read-only.