solidity/test/libsolidity/semanticTests/dirty_calldata_dynamic_array.sol

15 lines
307 B
Solidity
Raw Normal View History

contract C {
function f(int16[] calldata a) external returns (bool correct) {
uint32 x = uint32(a[1]);
uint r;
assembly {
r := x
}
correct = r == 0x7fff;
}
}
2020-07-20 13:06:45 +00:00
// ====
// compileViaYul: also
// ----
2020-07-20 13:06:45 +00:00
// f(int16[]): 0x20, 0x02, 0x7fff, 0x7fff -> true