Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update tests after restricting to only state vars
- Loading branch information
1 parent
095beca
commit ccaec3a
Showing
20 changed files
with
54 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
...cations/externalFunction/function_argument_location_specifier_test_external_transient.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
contract test { | ||
function f(bytes transient) external; | ||
} | ||
// ---- | ||
// TypeError 6651: (31-46): Data location must be "memory" or "calldata" for parameter in external function, but none was given. |
5 changes: 0 additions & 5 deletions
5
...externalFunction/function_argument_location_specifier_test_external_transient_storage.sol
This file was deleted.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
...cations/internalFunction/function_argument_location_specifier_test_internal_transient.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
contract test { | ||
function f(bytes transient x) internal {} | ||
function f(bytes transient) internal {} | ||
} | ||
// ---- | ||
// TypeError 6651: (31-48): Data location must be "storage", "memory" or "calldata" for parameter in function, but "transient" was given. | ||
// TypeError 6651: (31-46): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given. |
28 changes: 16 additions & 12 deletions
28
...ity/syntaxTests/dataLocations/libraries/library_function_with_data_location_transient.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
library L { | ||
function f(uint[] transient a) private pure returns (uint[] transient x) { } | ||
function g(uint[] transient b) internal pure returns (uint[] transient y) { } | ||
function h(uint[] transient c) public pure returns (uint[] transient w) { } | ||
function i(uint[] transient d) external pure returns (uint[] transient z) { } | ||
function f(uint[] transient) private pure returns (uint[] transient) { } | ||
function g(uint[] transient) internal pure returns (uint[] transient) { } | ||
function h(uint[] transient) public pure returns (uint[] transient) { } | ||
function i(uint[] transient) external pure returns (uint[] transient) { } | ||
} | ||
// ---- | ||
// TypeError 6651: (27-45): Data location must be "storage", "memory" or "calldata" for parameter in function, but "transient" was given. | ||
// TypeError 6651: (69-87): Data location must be "storage", "memory" or "calldata" for return parameter in function, but "transient" was given. | ||
// TypeError 6651: (108-126): Data location must be "storage", "memory" or "calldata" for parameter in function, but "transient" was given. | ||
// TypeError 6651: (151-169): Data location must be "storage", "memory" or "calldata" for return parameter in function, but "transient" was given. | ||
// TypeError 6651: (190-208): Data location must be "storage", "memory" or "calldata" for parameter in function, but "transient" was given. | ||
// TypeError 6651: (231-249): Data location must be "storage", "memory" or "calldata" for return parameter in function, but "transient" was given. | ||
// TypeError 6651: (270-288): Data location must be "storage", "memory" or "calldata" for parameter in external function, but "transient" was given. | ||
// TypeError 6651: (313-331): Data location must be "storage", "memory" or "calldata" for return parameter in function, but "transient" was given. | ||
// DeclarationError 2333: (67-83): Identifier already declared. | ||
// DeclarationError 2333: (145-161): Identifier already declared. | ||
// DeclarationError 2333: (221-237): Identifier already declared. | ||
// DeclarationError 2333: (299-315): Identifier already declared. | ||
// TypeError 6651: (27-43): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given. | ||
// TypeError 6651: (67-83): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given. | ||
// TypeError 6651: (104-120): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given. | ||
// TypeError 6651: (145-161): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given. | ||
// TypeError 6651: (182-198): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given. | ||
// TypeError 6651: (221-237): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given. | ||
// TypeError 6651: (258-274): Data location must be "storage", "memory" or "calldata" for parameter in external function, but none was given. | ||
// TypeError 6651: (299-315): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given. |
4 changes: 2 additions & 2 deletions
4
.../libraryExternalFunction/function_argument_location_specifier_test_external_transient.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
library test { | ||
function f(bytes transient x) external {} | ||
function f(bytes transient) external {} | ||
} | ||
// ---- | ||
// TypeError 6651: (30-47): Data location must be "storage", "memory" or "calldata" for parameter in external function, but "transient" was given. | ||
// TypeError 6651: (30-45): Data location must be "storage", "memory" or "calldata" for parameter in external function, but none was given. |
4 changes: 2 additions & 2 deletions
4
.../libraryInternalFunction/function_argument_location_specifier_test_internal_transient.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
library test { | ||
function f(bytes transient x) internal pure {} | ||
function f(bytes transient) internal pure {} | ||
} | ||
// ---- | ||
// TypeError 6651: (30-47): Data location must be "storage", "memory" or "calldata" for parameter in function, but "transient" was given. | ||
// TypeError 6651: (30-45): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...taxTests/dataLocations/privateFunction/private_function_parameters_location_transient.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
contract C { | ||
function f(uint[] transient x) private pure {} | ||
function f(uint[] transient) private pure {} | ||
} | ||
// ---- | ||
// TypeError 6651: (28-46): Data location must be "storage", "memory" or "calldata" for parameter in function, but "transient" was given. | ||
// TypeError 6651: (28-44): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given. |
4 changes: 2 additions & 2 deletions
4
...s/dataLocations/privateFunction/private_function_return_parameters_location_transient.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
contract C { | ||
function f() private pure returns (uint[] transient x) {} | ||
function f() private pure returns (uint[] transient) {} | ||
} | ||
// ---- | ||
// TypeError 6651: (52-70): Data location must be "storage", "memory" or "calldata" for return parameter in function, but "transient" was given. | ||
// TypeError 6651: (52-68): Data location must be "storage", "memory" or "calldata" for return parameter in function, but none was given. |
4 changes: 2 additions & 2 deletions
4
...taLocations/publicFunction/function_argument_location_specifier_test_public_transient.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
contract test { | ||
function f(bytes transient x) public; | ||
function f(bytes transient) public; | ||
} | ||
// ---- | ||
// TypeError 6651: (31-48): Data location must be "memory" or "calldata" for parameter in function, but "transient" was given. | ||
// TypeError 6651: (31-46): Data location must be "memory" or "calldata" for parameter in function, but none was given. |
4 changes: 2 additions & 2 deletions
4
...sts/dataLocations/publicFunction/public_function_return_parameters_location_transient.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
contract C { | ||
function h() public pure returns(uint[] transient x) {} | ||
function h() public pure returns(uint[] transient) {} | ||
} | ||
// ---- | ||
// TypeError 6651: (50-68): Data location must be "memory" or "calldata" for return parameter in function, but "transient" was given. | ||
// TypeError 6651: (50-66): Data location must be "memory" or "calldata" for return parameter in function, but none was given. |
5 changes: 2 additions & 3 deletions
5
test/libsolidity/syntaxTests/dataLocations/transient_function_type_parameter.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
contract C { | ||
function (uint transient x) external y; | ||
function (uint transient) external y; | ||
} | ||
// ---- | ||
// Warning 6162: (27-43): Naming function type parameters is deprecated. | ||
// TypeError 6651: (27-43): Data location can only be specified for array, struct or mapping types, but "transient" was given. | ||
// Warning 6162: (27-41): Naming function type parameters is deprecated. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 5 additions & 6 deletions
11
test/libsolidity/syntaxTests/functionTypes/function_type_with_transient_param.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
contract C { | ||
function (uint transient x) external y; | ||
function (uint[] transient w) external z; | ||
function (uint transient) external y; | ||
function (uint[] transient) external z; | ||
} | ||
// ---- | ||
// Warning 6162: (27-43): Naming function type parameters is deprecated. | ||
// Warning 6162: (71-89): Naming function type parameters is deprecated. | ||
// TypeError 6651: (27-43): Data location can only be specified for array, struct or mapping types, but "transient" was given. | ||
// TypeError 6651: (71-89): Data location must be "memory" or "calldata" for parameter in function, but "transient" was given. | ||
// Warning 6162: (27-41): Naming function type parameters is deprecated. | ||
// Warning 6162: (69-85): Naming function type parameters is deprecated. | ||
// TypeError 6651: (69-85): Data location must be "memory" or "calldata" for parameter in function, but none was given. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
test/libsolidity/syntaxTests/modifiers/transient_parameter.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
contract A { | ||
modifier mod2(uint[] transient b) { _; } | ||
modifier mod2(uint[] transient) { _; } | ||
} | ||
// ---- | ||
// TypeError 6651: (31-49): Data location must be "storage", "memory" or "calldata" for parameter in function, but "transient" was given. | ||
// TypeError 6651: (31-47): Data location must be "storage", "memory" or "calldata" for parameter in function, but none was given. |