`number` type is always an integer
sebbekarlsson opened this issue · comments
The compiler currently treats the number
type as an integer, always.
This causes problems, for example; this:
let age:number = 33.5;
becomes this:
int age = 33.5;
This could probably be solved by changing the datatype if the right
expression is a float
.
Here is a situation where it's a bit more difficult:
age: number;
number = 33.5;
In this situation, we cannot change the datatype of the initialization.