diff options
Diffstat (limited to 'test/libsolidity/syntaxTests/returnExpressions/tuple_return_mismatching_number_named.sol')
-rw-r--r-- | test/libsolidity/syntaxTests/returnExpressions/tuple_return_mismatching_number_named.sol | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/returnExpressions/tuple_return_mismatching_number_named.sol b/test/libsolidity/syntaxTests/returnExpressions/tuple_return_mismatching_number_named.sol new file mode 100644 index 00000000..86049719 --- /dev/null +++ b/test/libsolidity/syntaxTests/returnExpressions/tuple_return_mismatching_number_named.sol @@ -0,0 +1,19 @@ +contract C +{ + function f() public pure returns (uint a, uint b) + { + return 1; + } + function g() public pure returns (uint a, uint b) + { + return (1, 2, 3); + } + function h() public pure returns (uint a, uint b) + { + return; + } +} +// ---- +// TypeError: (81-89): Different number of arguments in return statement than in returns declaration. +// TypeError: (165-181): Different number of arguments in return statement than in returns declaration. +// TypeError: (257-264): Return arguments required. |