mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
14 lines
229 B
Solidity
14 lines
229 B
Solidity
|
contract C {
|
||
|
function f() public returns (uint256 r) {
|
||
|
for (uint256 x = 0; x < 10; ++x)
|
||
|
assembly {
|
||
|
r := add(r, x)
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// ====
|
||
|
// compileViaYul: also
|
||
|
// ----
|
||
|
// f() -> 45
|