mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fixes invalid function calls to literals inside tuple assignment's LHS.
This commit is contained in:
@@ -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().
|
||||
@@ -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.
|
||||
Reference in New Issue
Block a user