mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[test] Update tests to include location string.
This commit is contained in:
@@ -5,4 +5,4 @@ library L {
|
||||
}
|
||||
|
||||
// ----
|
||||
// TypeError 6651: (159-173): Data location must be "memory" or "calldata" for parameter in function, but "storage" was given.
|
||||
// TypeError 6651: (159-173='Nested storage'): Data location must be "memory" or "calldata" for parameter in function, but "storage" was given.
|
||||
|
||||
+1
-1
@@ -2,4 +2,4 @@ contract C {
|
||||
function i() external pure returns(uint[]) {}
|
||||
}
|
||||
// ----
|
||||
// TypeError 6651: (52-58): Data location must be "memory" or "calldata" for return parameter in function, but none was given.
|
||||
// TypeError 6651: (52-58='uint[]'): Data location must be "memory" or "calldata" for return parameter in function, but none was given.
|
||||
|
||||
+1
-1
@@ -2,4 +2,4 @@ contract test {
|
||||
function f(bytes storage) external;
|
||||
}
|
||||
// ----
|
||||
// TypeError 6651: (31-44): Data location must be "memory" or "calldata" for parameter in external function, but "storage" was given.
|
||||
// TypeError 6651: (31-44='bytes storage'): Data location must be "memory" or "calldata" for parameter in external function, but "storage" was given.
|
||||
|
||||
+1
-1
@@ -2,4 +2,4 @@ contract test {
|
||||
function f(bytes4 memory) public;
|
||||
}
|
||||
// ----
|
||||
// TypeError 6651: (31-44): Data location can only be specified for array, struct or mapping types, but "memory" was given.
|
||||
// TypeError 6651: (31-44='bytes4 memory'): Data location can only be specified for array, struct or mapping types, but "memory" was given.
|
||||
|
||||
+2
-2
@@ -5,5 +5,5 @@ contract C {
|
||||
function i() external pure returns(uint[] memory) {}
|
||||
}
|
||||
// ----
|
||||
// Warning 6321: (51-64): Unnamed return variable can remain unassigned. Add an explicit return with value to all non-reverting code paths or name the variable.
|
||||
// Warning 6321: (134-147): Unnamed return variable can remain unassigned. Add an explicit return with value to all non-reverting code paths or name the variable.
|
||||
// Warning 6321: (51-64='uint[] memory'): Unnamed return variable can remain unassigned. Add an explicit return with value to all non-reverting code paths or name the variable.
|
||||
// Warning 6321: (134-147='uint[] memory'): Unnamed return variable can remain unassigned. Add an explicit return with value to all non-reverting code paths or name the variable.
|
||||
|
||||
+1
-1
@@ -2,4 +2,4 @@ contract C {
|
||||
function g(uint[]) internal pure {}
|
||||
}
|
||||
// ----
|
||||
// TypeError 6651: (28-34): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given.
|
||||
// TypeError 6651: (28-34='uint[]'): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given.
|
||||
|
||||
+1
-1
@@ -2,4 +2,4 @@ contract C {
|
||||
function g() internal pure returns(uint[]) {}
|
||||
}
|
||||
// ----
|
||||
// TypeError 6651: (52-58): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
|
||||
// TypeError 6651: (52-58='uint[]'): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
|
||||
|
||||
+4
-4
@@ -6,7 +6,7 @@ library L {
|
||||
function j(mapping(uint => uint)) external pure {}
|
||||
}
|
||||
// ----
|
||||
// TypeError 6651: (52-59): Data location must be "storage", "memory" or "calldata" for parameter in external function, but none was given.
|
||||
// TypeError 6651: (93-99): Data location must be "storage", "memory" or "calldata" for parameter in external function, but none was given.
|
||||
// TypeError 6651: (133-134): Data location must be "storage", "memory" or "calldata" for parameter in external function, but none was given.
|
||||
// TypeError 6651: (168-189): Data location must be "storage", "memory" or "calldata" for parameter in external function, but none was given.
|
||||
// TypeError 6651: (52-59='uint[2]'): Data location must be "storage", "memory" or "calldata" for parameter in external function, but none was given.
|
||||
// TypeError 6651: (93-99='uint[]'): Data location must be "storage", "memory" or "calldata" for parameter in external function, but none was given.
|
||||
// TypeError 6651: (133-134='S'): Data location must be "storage", "memory" or "calldata" for parameter in external function, but none was given.
|
||||
// TypeError 6651: (168-189='mapping(uint => uint)'): Data location must be "storage", "memory" or "calldata" for parameter in external function, but none was given.
|
||||
|
||||
+4
-4
@@ -6,7 +6,7 @@ library L {
|
||||
function j() external pure returns (mapping(uint => uint)) {}
|
||||
}
|
||||
// ----
|
||||
// TypeError 6651: (77-84): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
|
||||
// TypeError 6651: (129-135): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
|
||||
// TypeError 6651: (180-181): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
|
||||
// TypeError 6651: (226-247): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
|
||||
// TypeError 6651: (77-84='uint[2]'): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
|
||||
// TypeError 6651: (129-135='uint[]'): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
|
||||
// TypeError 6651: (180-181='S'): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
|
||||
// TypeError 6651: (226-247='mapping(uint => uint)'): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
|
||||
|
||||
+6
-6
@@ -8,9 +8,9 @@ library L {
|
||||
function i(uint[] calldata, uint[] storage) external pure returns (S storage x) {return x; }
|
||||
}
|
||||
// ----
|
||||
// TypeError 3464: (197-198): This variable is of storage pointer type and can be accessed without prior assignment, which would lead to undefined behaviour.
|
||||
// TypeError 3464: (203-204): This variable is of storage pointer type and can be accessed without prior assignment, which would lead to undefined behaviour.
|
||||
// TypeError 3464: (359-360): This variable is of storage pointer type and can be accessed without prior assignment, which would lead to undefined behaviour.
|
||||
// TypeError 3464: (365-366): This variable is of storage pointer type and can be accessed without prior assignment, which would lead to undefined behaviour.
|
||||
// TypeError 3464: (460-461): This variable is of storage pointer type and can be accessed without prior assignment, which would lead to undefined behaviour.
|
||||
// TypeError 3464: (557-558): This variable is of storage pointer type and can be accessed without prior assignment, which would lead to undefined behaviour.
|
||||
// TypeError 3464: (197-198='a'): This variable is of storage pointer type and can be accessed without prior assignment, which would lead to undefined behaviour.
|
||||
// TypeError 3464: (203-204='c'): This variable is of storage pointer type and can be accessed without prior assignment, which would lead to undefined behaviour.
|
||||
// TypeError 3464: (359-360='a'): This variable is of storage pointer type and can be accessed without prior assignment, which would lead to undefined behaviour.
|
||||
// TypeError 3464: (365-366='c'): This variable is of storage pointer type and can be accessed without prior assignment, which would lead to undefined behaviour.
|
||||
// TypeError 3464: (460-461='x'): This variable is of storage pointer type and can be accessed without prior assignment, which would lead to undefined behaviour.
|
||||
// TypeError 3464: (557-558='x'): This variable is of storage pointer type and can be accessed without prior assignment, which would lead to undefined behaviour.
|
||||
|
||||
+8
-8
@@ -10,11 +10,11 @@ library L {
|
||||
function jp(mapping(uint => uint)) internal pure {}
|
||||
}
|
||||
// ----
|
||||
// TypeError 6651: (77-84): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
|
||||
// TypeError 6651: (129-135): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
|
||||
// TypeError 6651: (180-181): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
|
||||
// TypeError 6651: (226-247): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
|
||||
// TypeError 6651: (268-275): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given.
|
||||
// TypeError 6651: (310-316): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given.
|
||||
// TypeError 6651: (351-352): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given.
|
||||
// TypeError 6651: (387-408): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given.
|
||||
// TypeError 6651: (77-84='uint[2]'): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
|
||||
// TypeError 6651: (129-135='uint[]'): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
|
||||
// TypeError 6651: (180-181='S'): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
|
||||
// TypeError 6651: (226-247='mapping(uint => uint)'): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
|
||||
// TypeError 6651: (268-275='uint[2]'): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given.
|
||||
// TypeError 6651: (310-316='uint[]'): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given.
|
||||
// TypeError 6651: (351-352='S'): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given.
|
||||
// TypeError 6651: (387-408='mapping(uint => uint)'): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given.
|
||||
|
||||
+8
-8
@@ -10,11 +10,11 @@ library L {
|
||||
function jp(mapping(uint => uint)) private pure {}
|
||||
}
|
||||
// ----
|
||||
// TypeError 6651: (76-83): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
|
||||
// TypeError 6651: (127-133): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
|
||||
// TypeError 6651: (177-178): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
|
||||
// TypeError 6651: (222-243): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
|
||||
// TypeError 6651: (264-271): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given.
|
||||
// TypeError 6651: (305-311): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given.
|
||||
// TypeError 6651: (345-346): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given.
|
||||
// TypeError 6651: (380-401): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given.
|
||||
// TypeError 6651: (76-83='uint[2]'): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
|
||||
// TypeError 6651: (127-133='uint[]'): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
|
||||
// TypeError 6651: (177-178='S'): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
|
||||
// TypeError 6651: (222-243='mapping(uint => uint)'): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
|
||||
// TypeError 6651: (264-271='uint[2]'): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given.
|
||||
// TypeError 6651: (305-311='uint[]'): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given.
|
||||
// TypeError 6651: (345-346='S'): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given.
|
||||
// TypeError 6651: (380-401='mapping(uint => uint)'): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given.
|
||||
|
||||
+8
-8
@@ -9,11 +9,11 @@ library L {
|
||||
function ip(S) private pure {}
|
||||
function jp(mapping(uint => uint)) private pure {}}
|
||||
// ----
|
||||
// TypeError 6651: (76-83): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
|
||||
// TypeError 6651: (127-133): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
|
||||
// TypeError 6651: (177-178): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
|
||||
// TypeError 6651: (222-243): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
|
||||
// TypeError 6651: (264-271): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given.
|
||||
// TypeError 6651: (305-311): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given.
|
||||
// TypeError 6651: (345-346): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given.
|
||||
// TypeError 6651: (380-401): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given.
|
||||
// TypeError 6651: (76-83='uint[2]'): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
|
||||
// TypeError 6651: (127-133='uint[]'): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
|
||||
// TypeError 6651: (177-178='S'): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
|
||||
// TypeError 6651: (222-243='mapping(uint => uint)'): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
|
||||
// TypeError 6651: (264-271='uint[2]'): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given.
|
||||
// TypeError 6651: (305-311='uint[]'): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given.
|
||||
// TypeError 6651: (345-346='S'): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given.
|
||||
// TypeError 6651: (380-401='mapping(uint => uint)'): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given.
|
||||
|
||||
@@ -8,5 +8,5 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 7407: (93-94): Type int256[] memory is not implicitly convertible to expected type int256[] storage pointer.
|
||||
// TypeError 7407: (102-110): Type int256[] memory is not implicitly convertible to expected type int256[] storage pointer.
|
||||
// TypeError 7407: (93-94='b'): Type int256[] memory is not implicitly convertible to expected type int256[] storage pointer.
|
||||
// TypeError 7407: (102-110='int[](b)'): Type int256[] memory is not implicitly convertible to expected type int256[] storage pointer.
|
||||
|
||||
+1
-1
@@ -2,4 +2,4 @@ contract C {
|
||||
function f(uint[]) private pure {}
|
||||
}
|
||||
// ----
|
||||
// TypeError 6651: (28-34): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given.
|
||||
// TypeError 6651: (28-34='uint[]'): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given.
|
||||
|
||||
+1
-1
@@ -2,4 +2,4 @@ contract C {
|
||||
function f() private pure returns(uint[]) {}
|
||||
}
|
||||
// ----
|
||||
// TypeError 6651: (51-57): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
|
||||
// TypeError 6651: (51-57='uint[]'): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
|
||||
|
||||
+1
-1
@@ -2,4 +2,4 @@ contract test {
|
||||
function f(bytes storage) public;
|
||||
}
|
||||
// ----
|
||||
// TypeError 6651: (31-44): Data location must be "memory" or "calldata" for parameter in function, but "storage" was given.
|
||||
// TypeError 6651: (31-44='bytes storage'): Data location must be "memory" or "calldata" for parameter in function, but "storage" was given.
|
||||
|
||||
+1
-1
@@ -2,4 +2,4 @@ contract C {
|
||||
function h(uint[]) public pure {}
|
||||
}
|
||||
// ----
|
||||
// TypeError 6651: (28-34): Data location must be "memory" or "calldata" for parameter in function, but none was given.
|
||||
// TypeError 6651: (28-34='uint[]'): Data location must be "memory" or "calldata" for parameter in function, but none was given.
|
||||
|
||||
+1
-1
@@ -2,4 +2,4 @@ contract C {
|
||||
function h() public pure returns(uint[]) {}
|
||||
}
|
||||
// ----
|
||||
// TypeError 6651: (50-56): Data location must be "memory" or "calldata" for return parameter in function, but none was given.
|
||||
// TypeError 6651: (50-56='uint[]'): Data location must be "memory" or "calldata" for return parameter in function, but none was given.
|
||||
|
||||
@@ -3,4 +3,4 @@ contract C {
|
||||
constructor(S) {}
|
||||
}
|
||||
// ----
|
||||
// TypeError 6651: (48-49): Data location must be "storage" or "memory" for constructor parameter, but none was given.
|
||||
// TypeError 6651: (48-49='S'): Data location must be "storage" or "memory" for constructor parameter, but none was given.
|
||||
|
||||
+4
-4
@@ -7,7 +7,7 @@ contract test {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 6651: (48-63): Data location can only be specified for array, struct or mapping types, but "storage" was given.
|
||||
// TypeError 6651: (71-89): Data location can only be specified for array, struct or mapping types, but "storage" was given.
|
||||
// TypeError 6651: (97-111): Data location can only be specified for array, struct or mapping types, but "memory" was given.
|
||||
// TypeError 6651: (119-136): Data location can only be specified for array, struct or mapping types, but "memory" was given.
|
||||
// TypeError 6651: (48-63='uint storage a1'): Data location can only be specified for array, struct or mapping types, but "storage" was given.
|
||||
// TypeError 6651: (71-89='bytes16 storage b1'): Data location can only be specified for array, struct or mapping types, but "storage" was given.
|
||||
// TypeError 6651: (97-111='uint memory a2'): Data location can only be specified for array, struct or mapping types, but "memory" was given.
|
||||
// TypeError 6651: (119-136='bytes16 memory b2'): Data location can only be specified for array, struct or mapping types, but "memory" was given.
|
||||
|
||||
Reference in New Issue
Block a user