Test updates.

This commit is contained in:
chriseth 2020-05-14 19:02:45 +02:00
parent 99194b1450
commit fb40a8abb8
39 changed files with 67 additions and 68 deletions

View File

@ -6,4 +6,4 @@ contract C {
// ----
// DeclarationError: (28-45): The "constant" keyword can only be used for state variables.
// TypeError: (69-72): Invalid array length, expected integer literal or constant expression.
// TypeError: (64-75): Data location must be "storage" or "memory" for variable, but none was given.
// TypeError: (64-75): Data location must be "storage", "memory" or "calldata" for variable, but none was given.

View File

@ -5,5 +5,4 @@ library L {
}
// ----
// TypeError: (66-81): Data location must be "memory" for parameter in function, but "calldata" was given.
// TypeError: (159-173): Data location must be "memory" for parameter in function, but "storage" was given.
// TypeError: (159-173): Data location must be "memory" or "calldata" for parameter in function, but "storage" was given.

View File

@ -2,4 +2,4 @@ contract C {
function i() external pure returns(uint[]) {}
}
// ----
// TypeError: (52-58): Data location must be "memory" for return parameter in function, but none was given.
// TypeError: (52-58): Data location must be "memory" or "calldata" for return parameter in function, but none was given.

View File

@ -2,4 +2,5 @@ contract test {
function f(bytes memory) external;
}
// ----
// TypeError: (31-43): Data location must be "calldata" for parameter in external function, but "memory" was given.
// TypeError: (0-56): Contract "test" should be marked as abstract.
// TypeError: (20-54): Functions without implementation must be marked virtual.

View File

@ -2,4 +2,4 @@ contract test {
function f(bytes storage) external;
}
// ----
// TypeError: (31-44): Data location must be "calldata" for parameter in external function, but "storage" was given.
// TypeError: (31-44): Data location must be "memory" or "calldata" for parameter in external function, but "storage" was given.

View File

@ -2,4 +2,5 @@ contract test {
function f(bytes calldata) internal;
}
// ----
// TypeError: (31-45): Data location must be "storage" or "memory" for parameter in function, but "calldata" was given.
// TypeError: (0-58): Contract "test" should be marked as abstract.
// TypeError: (20-56): Functions without implementation must be marked virtual.

View File

@ -2,4 +2,4 @@ contract C {
function g(uint[]) internal pure {}
}
// ----
// TypeError: (28-34): Data location must be "storage" or "memory" for parameter in function, but none was given.
// TypeError: (28-34): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given.

View File

@ -2,4 +2,4 @@ contract C {
function g() internal pure returns(uint[]) {}
}
// ----
// TypeError: (52-58): Data location must be "storage" or "memory" for return parameter in function, but none was given.
// TypeError: (52-58): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.

View File

@ -6,7 +6,7 @@ library L {
function j(mapping(uint => uint)) external pure {}
}
// ----
// TypeError: (52-59): Data location must be "storage" or "calldata" for parameter in external function, but none was given.
// TypeError: (93-99): Data location must be "storage" or "calldata" for parameter in external function, but none was given.
// TypeError: (133-134): Data location must be "storage" or "calldata" for parameter in external function, but none was given.
// TypeError: (168-189): Data location must be "storage" or "calldata" for parameter in external function, but none was given.
// TypeError: (52-59): Data location must be "storage", "memory" or "calldata" for parameter in external function, but none was given.
// TypeError: (93-99): Data location must be "storage", "memory" or "calldata" for parameter in external function, but none was given.
// TypeError: (133-134): Data location must be "storage", "memory" or "calldata" for parameter in external function, but none was given.
// TypeError: (168-189): Data location must be "storage", "memory" or "calldata" for parameter in external function, but none was given.

View File

@ -6,7 +6,7 @@ library L {
function j() external pure returns (mapping(uint => uint)) {}
}
// ----
// TypeError: (77-84): Data location must be "storage" or "memory" for return parameter in function, but none was given.
// TypeError: (129-135): Data location must be "storage" or "memory" for return parameter in function, but none was given.
// TypeError: (180-181): Data location must be "storage" or "memory" for return parameter in function, but none was given.
// TypeError: (226-247): Data location must be "storage" or "memory" for return parameter in function, but none was given.
// TypeError: (77-84): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
// TypeError: (129-135): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
// TypeError: (180-181): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
// TypeError: (226-247): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.

View File

@ -10,11 +10,11 @@ library L {
function jp(mapping(uint => uint)) internal pure {}
}
// ----
// TypeError: (77-84): Data location must be "storage" or "memory" for return parameter in function, but none was given.
// TypeError: (129-135): Data location must be "storage" or "memory" for return parameter in function, but none was given.
// TypeError: (180-181): Data location must be "storage" or "memory" for return parameter in function, but none was given.
// TypeError: (226-247): Data location must be "storage" or "memory" for return parameter in function, but none was given.
// TypeError: (268-275): Data location must be "storage" or "memory" for parameter in function, but none was given.
// TypeError: (310-316): Data location must be "storage" or "memory" for parameter in function, but none was given.
// TypeError: (351-352): Data location must be "storage" or "memory" for parameter in function, but none was given.
// TypeError: (387-408): Data location must be "storage" or "memory" for parameter in function, but none was given.
// TypeError: (77-84): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
// TypeError: (129-135): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
// TypeError: (180-181): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
// TypeError: (226-247): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
// TypeError: (268-275): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given.
// TypeError: (310-316): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given.
// TypeError: (351-352): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given.
// TypeError: (387-408): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given.

View File

@ -10,11 +10,11 @@ library L {
function jp(mapping(uint => uint)) private pure {}
}
// ----
// TypeError: (76-83): Data location must be "storage" or "memory" for return parameter in function, but none was given.
// TypeError: (127-133): Data location must be "storage" or "memory" for return parameter in function, but none was given.
// TypeError: (177-178): Data location must be "storage" or "memory" for return parameter in function, but none was given.
// TypeError: (222-243): Data location must be "storage" or "memory" for return parameter in function, but none was given.
// TypeError: (264-271): Data location must be "storage" or "memory" for parameter in function, but none was given.
// TypeError: (305-311): Data location must be "storage" or "memory" for parameter in function, but none was given.
// TypeError: (345-346): Data location must be "storage" or "memory" for parameter in function, but none was given.
// TypeError: (380-401): Data location must be "storage" or "memory" for parameter in function, but none was given.
// TypeError: (76-83): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
// TypeError: (127-133): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
// TypeError: (177-178): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
// TypeError: (222-243): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
// TypeError: (264-271): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given.
// TypeError: (305-311): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given.
// TypeError: (345-346): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given.
// TypeError: (380-401): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given.

View File

@ -9,11 +9,11 @@ library L {
function ip(S) private pure {}
function jp(mapping(uint => uint)) private pure {}}
// ----
// TypeError: (76-83): Data location must be "storage" or "memory" for return parameter in function, but none was given.
// TypeError: (127-133): Data location must be "storage" or "memory" for return parameter in function, but none was given.
// TypeError: (177-178): Data location must be "storage" or "memory" for return parameter in function, but none was given.
// TypeError: (222-243): Data location must be "storage" or "memory" for return parameter in function, but none was given.
// TypeError: (264-271): Data location must be "storage" or "memory" for parameter in function, but none was given.
// TypeError: (305-311): Data location must be "storage" or "memory" for parameter in function, but none was given.
// TypeError: (345-346): Data location must be "storage" or "memory" for parameter in function, but none was given.
// TypeError: (380-401): Data location must be "storage" or "memory" for parameter in function, but none was given.
// TypeError: (76-83): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
// TypeError: (127-133): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
// TypeError: (177-178): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
// TypeError: (222-243): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.
// TypeError: (264-271): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given.
// TypeError: (305-311): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given.
// TypeError: (345-346): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given.
// TypeError: (380-401): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given.

View File

@ -2,4 +2,3 @@ library test {
function f(bytes memory) external {}
}
// ----
// TypeError: (30-42): Data location must be "storage" or "calldata" for parameter in external function, but "memory" was given.

View File

@ -2,4 +2,3 @@ library test {
function f(bytes calldata) internal pure {}
}
// ----
// TypeError: (30-44): Data location must be "storage" or "memory" for parameter in function, but "calldata" was given.

View File

@ -2,4 +2,4 @@ contract C {
function f(uint[]) private pure {}
}
// ----
// TypeError: (28-34): Data location must be "storage" or "memory" for parameter in function, but none was given.
// TypeError: (28-34): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given.

View File

@ -2,4 +2,4 @@ contract C {
function f() private pure returns(uint[]) {}
}
// ----
// TypeError: (51-57): Data location must be "storage" or "memory" for return parameter in function, but none was given.
// TypeError: (51-57): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given.

View File

@ -2,4 +2,5 @@ contract test {
function f(bytes calldata) public;
}
// ----
// TypeError: (31-45): Data location must be "memory" for parameter in function, but "calldata" was given.
// TypeError: (0-56): Contract "test" should be marked as abstract.
// TypeError: (20-54): Functions without implementation must be marked virtual.

View File

@ -2,4 +2,4 @@ contract test {
function f(bytes storage) public;
}
// ----
// TypeError: (31-44): Data location must be "memory" for parameter in function, but "storage" was given.
// TypeError: (31-44): Data location must be "memory" or "calldata" for parameter in function, but "storage" was given.

View File

@ -2,4 +2,4 @@ contract C {
function h(uint[]) public pure {}
}
// ----
// TypeError: (28-34): Data location must be "memory" for parameter in function, but none was given.
// TypeError: (28-34): Data location must be "memory" or "calldata" for parameter in function, but none was given.

View File

@ -2,4 +2,4 @@ contract C {
function h() public pure returns(uint[]) {}
}
// ----
// TypeError: (50-56): Data location must be "memory" for return parameter in function, but none was given.
// TypeError: (50-56): Data location must be "memory" or "calldata" for return parameter in function, but none was given.

View File

@ -3,4 +3,4 @@ contract c {
}
// ----
// TypeError: (51-52): Invalid array length, expected integer literal or constant expression.
// TypeError: (45-55): Data location must be "storage" or "memory" for variable, but none was given.
// TypeError: (45-55): Data location must be "storage", "memory" or "calldata" for variable, but none was given.

View File

@ -3,4 +3,4 @@ contract c {
}
// ----
// TypeError: (51-53): Array with negative length specified.
// TypeError: (45-56): Data location must be "storage" or "memory" for variable, but none was given.
// TypeError: (45-56): Data location must be "storage", "memory" or "calldata" for variable, but none was given.

View File

@ -2,4 +2,3 @@ contract C {
function f(uint[] memory a) external {}
}
// ----
// TypeError: (28-43): Data location must be "calldata" for parameter in external function, but "memory" was given.

View File

@ -2,4 +2,4 @@ contract C {
function f(uint[] storage a) external {}
}
// ----
// TypeError: (28-44): Data location must be "calldata" for parameter in external function, but "storage" was given.
// TypeError: (28-44): Data location must be "memory" or "calldata" for parameter in external function, but "storage" was given.

View File

@ -5,4 +5,4 @@ contract test {
}
// ----
// TypeError: (55-58): Array with fractional length specified.
// TypeError: (50-61): Data location must be "storage" or "memory" for variable, but none was given.
// TypeError: (50-61): Data location must be "storage", "memory" or "calldata" for variable, but none was given.

View File

@ -5,4 +5,4 @@ contract test {
}
// ----
// TypeError: (55-65): Invalid array length, expected integer literal or constant expression.
// TypeError: (50-68): Data location must be "storage" or "memory" for variable, but none was given.
// TypeError: (50-68): Data location must be "storage", "memory" or "calldata" for variable, but none was given.

View File

@ -5,4 +5,4 @@ contract test {
}
// ----
// TypeError: (55-66): Invalid array length, expected integer literal or constant expression.
// TypeError: (50-69): Data location must be "storage" or "memory" for variable, but none was given.
// TypeError: (50-69): Data location must be "storage", "memory" or "calldata" for variable, but none was given.

View File

@ -9,5 +9,5 @@ contract C {
}
}
// ----
// TypeError: (104-107): Data location must be "storage" or "memory" for variable, but none was given.
// TypeError: (123-131): Data location must be "storage" or "memory" for variable, but none was given.
// TypeError: (104-107): Data location must be "storage", "memory" or "calldata" for variable, but none was given.
// TypeError: (123-131): Data location must be "storage", "memory" or "calldata" for variable, but none was given.

View File

@ -3,4 +3,4 @@ contract C {
}
}
// ----
// TypeError: (28-57): Data location must be "calldata" for parameter in external function, but "storage" was given.
// TypeError: (28-57): Data location must be "memory" or "calldata" for parameter in external function, but "storage" was given.

View File

@ -3,4 +3,4 @@ contract C {
}
}
// ----
// TypeError: (28-57): Data location must be "memory" for parameter in function, but "storage" was given.
// TypeError: (28-57): Data location must be "memory" or "calldata" for parameter in function, but "storage" was given.

View File

@ -3,4 +3,4 @@ contract C {
}
}
// ----
// TypeError: (28-59): Data location must be "calldata" for parameter in external function, but "storage" was given.
// TypeError: (28-59): Data location must be "memory" or "calldata" for parameter in external function, but "storage" was given.

View File

@ -3,4 +3,4 @@ contract C {
}
}
// ----
// TypeError: (28-59): Data location must be "memory" for parameter in function, but "storage" was given.
// TypeError: (28-59): Data location must be "memory" or "calldata" for parameter in function, but "storage" was given.

View File

@ -3,4 +3,4 @@ contract C {
}
}
// ----
// TypeError: (37-64): Data location must be "memory" for parameter in function, but "storage" was given.
// TypeError: (37-64): Data location must be "memory" or "calldata" for parameter in function, but "storage" was given.

View File

@ -3,4 +3,4 @@ contract C {
}
}
// ----
// TypeError: (57-84): Data location must be "memory" for return parameter in function, but "storage" was given.
// TypeError: (57-84): Data location must be "memory" or "calldata" for return parameter in function, but "storage" was given.

View File

@ -3,4 +3,4 @@ contract C {
}
}
// ----
// TypeError: (53-84): Data location must be "memory" for return parameter in function, but "storage" was given.
// TypeError: (53-84): Data location must be "memory" or "calldata" for return parameter in function, but "storage" was given.

View File

@ -3,4 +3,4 @@ contract C {
}
}
// ----
// TypeError: (51-82): Data location must be "memory" for return parameter in function, but "storage" was given.
// TypeError: (51-82): Data location must be "memory" or "calldata" for return parameter in function, but "storage" was given.

View File

@ -3,4 +3,4 @@ contract C {
}
}
// ----
// TypeError: (53-82): Data location must be "memory" for return parameter in function, but "storage" was given.
// TypeError: (53-82): Data location must be "memory" or "calldata" for return parameter in function, but "storage" was given.

View File

@ -3,4 +3,4 @@ contract C {
}
}
// ----
// TypeError: (51-80): Data location must be "memory" for return parameter in function, but "storage" was given.
// TypeError: (51-80): Data location must be "memory" or "calldata" for return parameter in function, but "storage" was given.