Skip to content

Commit 14cdb76

Browse files
chrisethekpyron
authored andcommitted
Add failing test
1 parent 80f6a13 commit 14cdb76

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
contract Test {
2+
uint256 x;
3+
4+
function test() public returns (uint256) {
5+
uint256 a = myGetX();
6+
x = 5;
7+
uint256 b = myGetX();
8+
assembly {
9+
log0(0, 64)
10+
}
11+
return a + b + myGetX();
12+
}
13+
14+
function myGetX() internal view returns (uint256) {
15+
assembly {
16+
mstore(1, 0x123456789abcdef)
17+
}
18+
return x;
19+
}
20+
}
21+
// ----
22+
// test() -> 10
23+
// ~ emit <anonymous>: 0x0123456789abcd, 0xef00000000000000000000000000000000000000000000000000000000000000

0 commit comments

Comments
 (0)