I'm currently trying Reason and facing an error I don't understand
This is my code:
let mult = (x:float, y:float):float => x * y;
When I compile it with BuckleScript I get the following error:
We've found a bug for you!
D:\1\bbl\orga\src\demo.re 1:40
1 Ôöé let mult = (a:float, b:float):float => a * b;
This has type:
float
But somewhere wanted:
int
You can convert a float to a int with int_of_float.If this is a literal, you want a number without a trailing dot (e.g. 20).
I don't see why the compiler would need to turn a float
into an int
here