Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save swapnilraj/f9b22d95ea7df31bbcd8a214cb62a660 to your computer and use it in GitHub Desktop.
Save swapnilraj/f9b22d95ea7df31bbcd8a214cb62a660 to your computer and use it in GitHub Desktop.
Solidity Semantic Test
contract test {
function f(bool cond) public returns (uint) {
uint8 x = 0xcd;
uint16 y = 0xabab;
return cond ? x : y;
}
}
// ====
// compileToEwasm: also
// compileViaYul: also
// ----
// f(bool): true -> 0xcd
// f(bool): false -> 0xabab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment