solidity/test/libsolidity/syntaxTests/inheritance/override/calldata_memory_struct.sol

17 lines
559 B
Solidity
Raw Normal View History

2020-11-23 18:06:44 +00:00
pragma abicoder v2;
2018-11-12 14:14:13 +00:00
contract A {
uint dummy;
struct S { int a; }
2019-11-05 17:25:34 +00:00
function f(S calldata) external virtual pure {}
function g(S calldata) external virtual view { dummy; }
function h(S calldata) external virtual { dummy = 42; }
function i(S calldata) external virtual payable {}
2018-11-12 14:14:13 +00:00
}
contract B is A {
2019-09-16 12:33:43 +00:00
function f(S memory) public override pure {}
function g(S memory) public override view { dummy; }
function h(S memory) public override { dummy = 42; }
function i(S memory) public override payable {}
2018-11-12 14:14:13 +00:00
}
// ----