Added default data locations to parameters for syntax tests.

This commit is contained in:
Chase McDermott
2018-07-11 20:24:50 -05:00
parent 71777ce729
commit fc78b32847
38 changed files with 83 additions and 83 deletions
@@ -9,7 +9,7 @@ contract C {
struct W { uint x; }
function f(T) public pure { }
function f(T memory) public pure { }
}
// ----
// Warning: (0-33): Experimental features are turned on. Do not use experimental features on live deployments.
@@ -9,7 +9,7 @@ contract TestContract
SubStruct subStruct1;
SubStruct subStruct2;
}
function addTestStruct(TestStruct) public pure {}
function addTestStruct(TestStruct memory) public pure {}
}
// ----
// Warning: (0-33): Experimental features are turned on. Do not use experimental features on live deployments.
@@ -1,6 +1,6 @@
contract C {
struct S { uint a; S[] sub; }
function f() public pure returns (uint, S) {
function f() public pure returns (uint, S memory) {
}
}
// ----
@@ -1,6 +1,6 @@
contract C {
struct S { uint a; S[2][] sub; }
function f() public pure returns (uint, S) {
function f() public pure returns (uint, S memory) {
}
}
// ----
@@ -1,8 +1,8 @@
contract C {
struct S { uint a; S[][][] sub; }
struct T { S s; }
function f() public pure returns (uint x, T t) {
function f() public pure returns (uint x, T memory t) {
}
}
// ----
// TypeError: (119-122): Internal or recursive type is not allowed for public or external functions.
// TypeError: (119-129): Internal or recursive type is not allowed for public or external functions.