1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
contract C {
uint256 public x;
function f(uint256 y) public payable {
x = y;
}
function g(uint256 y) external {
x = y;
}
function h() public {
this.g(12);
}
}
contract D {
C c = new C();
function f() public payable returns (uint256) {
c.g(3);
return c.x();
}
function g() public returns (uint256) {
c.g(8);
return c.x();
}
function h() public returns (uint256) {
c.h();
return c.x();
}
}
// ====
// compileViaYul: also
// ----
// f() -> 3
// g() -> 8
// h() -> 12