mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
27 lines
455 B
Solidity
27 lines
455 B
Solidity
// This triggered a bug in some version because the variable in the modifier was not
|
|
// unregistered correctly.
|
|
contract C {
|
|
uint256 public x;
|
|
modifier m1 {
|
|
address a1 = msg.sender;
|
|
x++;
|
|
_;
|
|
}
|
|
|
|
function f1() public m1() {
|
|
x += 7;
|
|
}
|
|
|
|
function f2() public m1() {
|
|
x += 3;
|
|
}
|
|
}
|
|
// ====
|
|
// compileViaYul: also
|
|
// compileToEwasm: also
|
|
// ----
|
|
// f1() ->
|
|
// x() -> 0x08
|
|
// f2() ->
|
|
// x() -> 0x0c
|