mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Added default data locations to parameters for syntax tests.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user