aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests
diff options
context:
space:
mode:
Diffstat (limited to 'test/libsolidity/syntaxTests')
-rw-r--r--test/libsolidity/syntaxTests/inheritance/override/calldata_memory_struct.sol4
-rw-r--r--test/libsolidity/syntaxTests/structs/array_calldata.sol10
-rw-r--r--test/libsolidity/syntaxTests/structs/calldata.sol8
3 files changed, 22 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/inheritance/override/calldata_memory_struct.sol b/test/libsolidity/syntaxTests/inheritance/override/calldata_memory_struct.sol
index 42aebf30..b81e3859 100644
--- a/test/libsolidity/syntaxTests/inheritance/override/calldata_memory_struct.sol
+++ b/test/libsolidity/syntaxTests/inheritance/override/calldata_memory_struct.sol
@@ -15,3 +15,7 @@ contract B is A {
}
// ----
// Warning: (0-33): Experimental features are turned on. Do not use experimental features on live deployments.
+// TypeError: (102-112): Calldata structs are not yet supported.
+// TypeError: (146-156): Calldata structs are not yet supported.
+// TypeError: (198-208): Calldata structs are not yet supported.
+// TypeError: (250-260): Calldata structs are not yet supported.
diff --git a/test/libsolidity/syntaxTests/structs/array_calldata.sol b/test/libsolidity/syntaxTests/structs/array_calldata.sol
new file mode 100644
index 00000000..3aac5606
--- /dev/null
+++ b/test/libsolidity/syntaxTests/structs/array_calldata.sol
@@ -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.
diff --git a/test/libsolidity/syntaxTests/structs/calldata.sol b/test/libsolidity/syntaxTests/structs/calldata.sol
new file mode 100644
index 00000000..dadf6e4f
--- /dev/null
+++ b/test/libsolidity/syntaxTests/structs/calldata.sol
@@ -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.