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

8 lines
252 B
Solidity
Raw Normal View History

contract test {
function f() public {
uint a = 1/3;
}
}
// ----
// TypeError: (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.