-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Extend the typechecker of TinySol so to handle functions with multiple return values:
For example, the contract:
contract C {
int x;
bool b;
function f() public view returns (int,bool) { return(x,b); }
function g() public { int w; int y; bool z; (w,y,z) = this.f(); x +=y; b = !z; }
}should not pass typechecking, since the function f returns a pair of values, but the assignment refers to a triple.
The following contract should not pass typechecking as well:
contract C {
int x;
bool b;
function f() public view returns (int,bool) { return(x,b); }
function g() public { bool y; bool z; (y,z) = this.f(); }
}since the type of the first element of the pair does not match with the return type of the function.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request