2019-06-12 11:07:06 +00:00
|
|
|
contract C {
|
|
|
|
function f(uint a, uint b) public pure returns (uint x) {
|
|
|
|
x = a - b;
|
|
|
|
}
|
|
|
|
function g(uint8 a, uint8 b) public pure returns (uint8 x) {
|
|
|
|
x = a - b;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// ====
|
2020-11-21 13:54:16 +00:00
|
|
|
// compileToEwasm: also
|
2020-09-15 14:16:30 +00:00
|
|
|
// compileViaYul: also
|
2019-06-12 11:07:06 +00:00
|
|
|
// ----
|
|
|
|
// f(uint256,uint256): 6, 5 -> 1
|
|
|
|
// f(uint256,uint256): 6, 6 -> 0
|
2020-10-13 11:28:39 +00:00
|
|
|
// f(uint256,uint256): 5, 6 -> FAILURE, hex"4e487b71", 0x11
|
2019-06-12 11:07:06 +00:00
|
|
|
// g(uint8,uint8): 6, 5 -> 1
|
|
|
|
// g(uint8,uint8): 6, 6 -> 0
|
2020-10-13 11:28:39 +00:00
|
|
|
// g(uint8,uint8): 5, 6 -> FAILURE, hex"4e487b71", 0x11
|