solidity/test/libsolidity/semanticTests/dirty_calldata_dynamic_array.sol
2022-05-19 20:23:28 +02:00

13 lines
284 B
Solidity

contract C {
function f(int16[] calldata a) external returns (bool correct) {
uint32 x = uint32(uint16(a[1]));
uint r;
assembly {
r := x
}
correct = r == 0x7fff;
}
}
// ----
// f(int16[]): 0x20, 0x02, 0x7fff, 0x7fff -> true