More strict override check for data locations.

This commit is contained in:
chriseth
2022-05-17 13:02:12 +02:00
parent bef348aa6a
commit dfa0bcf760
13 changed files with 165 additions and 11 deletions
@@ -0,0 +1,18 @@
abstract contract A {
function f(uint256[] calldata a) external virtual returns (uint256[] calldata);
}
contract B is A {
function f(uint256[] memory a) public override returns (uint256[] memory) {
return a;
}
function g(uint[] calldata x) public returns (uint256[] memory) {
return f(x);
}
}
// ====
// compileViaYul: also
// ----
// f(uint256[]): 0x20, 2, 9, 8 -> 0x20, 2, 9, 8
// g(uint256[]): 0x20, 2, 9, 8 -> 0x20, 2, 9, 8