c3c
c3c copied to clipboard
cannot call method on integer literal
fn int main()
{
1.is_even(); // Error: Integer suffix 'i' is not valid for a floating point literal.
return 0;
}
as pointed out here this isn't a huge deal:
The question is whether 0. style should be allowed or not. Should double d = 3.; be allowed?
My immediate thought would be to disallow it and either add a d suffix to be consistent with allowing 3f, or just require a .0.
could this also be resolved with brackets?
(5.).is_even()
It could be yes. The question is what the best solution is for C3.