Fixes invalid function calls to literals inside tuple assignment's LHS.

This commit is contained in:
Christian Parpart
2018-10-15 10:35:11 +02:00
committed by Christian Parpart
parent 26dc876c28
commit 6d815a142f
3 changed files with 22 additions and 2 deletions
@@ -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.