mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
New tests.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
contract C {
|
||||
function add(uint16 a, uint16 b) public returns (uint16) {
|
||||
unchecked {
|
||||
return a + b;
|
||||
}
|
||||
}
|
||||
|
||||
function f(uint16 a) public returns (uint16) {
|
||||
return add(a, 0x100) + 0x100;
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f(uint16): 7 -> 0x0207
|
||||
// f(uint16): 0xffff -> 511
|
||||
// f(uint16): 0xfeff -> FAILURE
|
||||
Reference in New Issue
Block a user