mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge remote-tracking branch 'origin/develop' into breaking
This commit is contained in:
@@ -3,7 +3,8 @@ contract C {
|
||||
modifier run() {
|
||||
for (uint256 i = 0; i < 10; i++) {
|
||||
_;
|
||||
break;
|
||||
if (i == 1)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,10 +14,7 @@ contract C {
|
||||
x = t;
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// x() -> 0
|
||||
// f() ->
|
||||
// x() -> 1
|
||||
// x() -> 2
|
||||
|
||||
@@ -1,22 +1,21 @@
|
||||
contract C {
|
||||
uint256 public x;
|
||||
modifier run() {
|
||||
modifier m() {
|
||||
for (uint256 i = 0; i < 10; i++) {
|
||||
_;
|
||||
break;
|
||||
++x;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
function f() public run {
|
||||
uint256 k = x;
|
||||
uint256 t = k + 1;
|
||||
x = t;
|
||||
function f() public m m m returns (uint) {
|
||||
for (uint256 i = 0; i < 10; i++) {
|
||||
++x;
|
||||
return 42;
|
||||
}
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// x() -> 0
|
||||
// f() ->
|
||||
// x() -> 1
|
||||
// f() -> 42
|
||||
// x() -> 4
|
||||
|
||||
Reference in New Issue
Block a user