mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Tests for recursive suffix calls
This commit is contained in:
parent
9aacc8d943
commit
08d54f274a
@ -0,0 +1,16 @@
|
||||
function double(uint x) pure suffix returns (uint) {
|
||||
if (x == 0)
|
||||
return 0;
|
||||
if (x == 1)
|
||||
return 0 double + 2;
|
||||
else
|
||||
return 1 double * x;
|
||||
}
|
||||
|
||||
contract C {
|
||||
function test() public pure returns (uint) {
|
||||
return 10 double;
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// test() -> 20
|
Loading…
Reference in New Issue
Block a user