solidity/test/libsolidity/syntaxTests/nameAndTypeResolution/327_rational_index_access.sol

9 lines
267 B
Solidity

contract test {
function f() public {
uint[] memory a;
a[.5];
}
}
// ----
// TypeError: (77-79): Type rational_const 1 / 2 is not implicitly convertible to expected type uint256. Try converting to type ufixed8x1 or use an explicit conversion.