solidity/test/libsolidity/semanticTests/cleanup/exp_cleanup_smaller_base.sol

14 lines
284 B
Solidity
Raw Normal View History

2020-07-23 14:16:39 +00:00
contract C {
function f() public pure returns (uint16 x) {
// tests that ``e`` is not converted to uint8
// right before the exp
uint16 e = 0x100;
uint8 b = 0x2;
2020-09-15 14:16:30 +00:00
unchecked {
return b**e;
}
2020-07-23 14:16:39 +00:00
}
}
// ----
// f() -> 0x00