mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Disallow calldata structs.
This commit is contained in:
committed by
chriseth
parent
d3270bc311
commit
610ef9f199
@@ -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.
|
||||
Reference in New Issue
Block a user