Last active
January 19, 2022 17:57
-
-
Save swapnilraj/2ad5644483745e064552272778b842ee to your computer and use it in GitHub Desktop.
Solidity Semantic Tests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
contract C { | |
function test() public returns (uint256) { | |
// Note that this only works because computation on literals is done using | |
// unbounded integers. | |
if ((2**255 + 2**255) % 7 != addmod(2**255, 2**255, 7)) return 1; | |
if ((2**255 + 2**255) % 7 != addmod(2**255, 2**255, 7)) return 2; | |
return 0; | |
} | |
} | |
// ==== | |
// compileToEwasm: also | |
// compileViaYul: also | |
// ---- | |
// test() -> 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment