diff options
Diffstat (limited to 'test/libsolidity/syntaxTests')
3 files changed, 6 insertions, 7 deletions
diff --git a/test/libsolidity/syntaxTests/functionTypes/function_type_return_parameters_with_names.sol b/test/libsolidity/syntaxTests/functionTypes/function_type_return_parameters_with_names.sol new file mode 100644 index 00000000..12191530 --- /dev/null +++ b/test/libsolidity/syntaxTests/functionTypes/function_type_return_parameters_with_names.sol @@ -0,0 +1,5 @@ +contract C { + function(uint) returns (bool ret) f; +} +// ---- +// SyntaxError: (41-49): Return parameters in function types may not be named. diff --git a/test/libsolidity/syntaxTests/functionTypes/warn_function_type_return_parameters_with_names.sol b/test/libsolidity/syntaxTests/functionTypes/warn_function_type_return_parameters_with_names.sol deleted file mode 100644 index 67a74e54..00000000 --- a/test/libsolidity/syntaxTests/functionTypes/warn_function_type_return_parameters_with_names.sol +++ /dev/null @@ -1,5 +0,0 @@ -contract C { - function(uint) returns (bool ret) f; -} -// ---- -// Warning: (41-49): Naming function type return parameters is deprecated. diff --git a/test/libsolidity/syntaxTests/parsing/function_type_in_struct.sol b/test/libsolidity/syntaxTests/parsing/function_type_in_struct.sol index d3c84678..c7703b47 100644 --- a/test/libsolidity/syntaxTests/parsing/function_type_in_struct.sol +++ b/test/libsolidity/syntaxTests/parsing/function_type_in_struct.sol @@ -1,6 +1,6 @@ contract test { struct S { - function (uint x, uint y) internal returns (uint a) f; + function (uint x, uint y) internal returns (uint) f; function (uint, uint) external returns (uint) g; uint d; } @@ -8,4 +8,3 @@ contract test { // ---- // Warning: (49-55): Naming function type parameters is deprecated. // Warning: (57-63): Naming function type parameters is deprecated. -// Warning: (83-89): Naming function type return parameters is deprecated. |