diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/libsolidity/syntaxTests/types/function_call_fail.sol | 9 | ||||
-rw-r--r-- | test/libsolidity/syntaxTests/types/function_call_fail2.sol | 7 |
2 files changed, 16 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/types/function_call_fail.sol b/test/libsolidity/syntaxTests/types/function_call_fail.sol new file mode 100644 index 00000000..ef52ab44 --- /dev/null +++ b/test/libsolidity/syntaxTests/types/function_call_fail.sol @@ -0,0 +1,9 @@ +contract C { + function f(uint y) public pure { + (4(y)) = 2; + } +} +// ---- +// TypeError: (59-63): Type is not callable +// TypeError: (59-63): Expression has to be an lvalue. +// TypeError: (67-68): Type int_const 2 is not implicitly convertible to expected type tuple(). diff --git a/test/libsolidity/syntaxTests/types/function_call_fail2.sol b/test/libsolidity/syntaxTests/types/function_call_fail2.sol new file mode 100644 index 00000000..389ffce9 --- /dev/null +++ b/test/libsolidity/syntaxTests/types/function_call_fail2.sol @@ -0,0 +1,7 @@ +contract C { + function f(uint y) public pure returns (uint) { + (f(y)) = 2; + } +} +// ---- +// TypeError: (74-78): Expression has to be an lvalue. |