solidity/test/libsolidity/syntaxTests/nameAndTypeResolution/344_one_divided_by_three_integer_conversion.sol

8 lines
257 B
Solidity

contract test {
function f() public {
uint a = 1/3;
}
}
// ----
// TypeError 4486: (50-62): Type rational_const 1 / 3 is not implicitly convertible to expected type uint256. Try converting to type ufixed256x77 or use an explicit conversion.