Disallow calldata structs.

This commit is contained in:
Daniel Kirchner
2019-01-21 10:30:57 +01:00
committed by chriseth
parent d3270bc311
commit 610ef9f199
6 changed files with 44 additions and 5 deletions
@@ -0,0 +1,10 @@
pragma experimental ABIEncoderV2;
contract Test {
struct S { int a; }
function f(S[] calldata) external { }
function f(S[][] calldata) external { }
}
// ----
// Warning: (0-33): Experimental features are turned on. Do not use experimental features on live deployments.
// TypeError: (89-101): Calldata structs are not yet supported.
// TypeError: (131-145): Calldata structs are not yet supported.
@@ -0,0 +1,8 @@
pragma experimental ABIEncoderV2;
contract Test {
struct S { int a; }
function f(S calldata) external { }
}
// ----
// Warning: (0-33): Experimental features are turned on. Do not use experimental features on live deployments.
// TypeError: (89-99): Calldata structs are not yet supported.