Ran the command, mirah -e "a=1;a=1+2.0" and it reported an error.
Same issue with the gist https://gist.github.com/2431910
I was expecting it to do some automatic type casting or perhaps treat a as a double since I never said it was an int.
I think this is expected behaviour for a language with local type inferencing in a statically-typed language like Mirah.
a = 1 # declares a variable 'a', integer type inferred.
a = 1 + 2.0 # type error: 'a' is not a double.
I am not sure about that, I would still expect a to expand from "inferred" type int to double unless I have used some feature which is there only in int and not in double. For e.g. if I had done a! somewhere, then it would make sense for compiler to complain.
Moreover, will we not support automatic type casting or automatic downgrading, so that assigning a double to int should automatically strip the fractional part.
This works with master:
$ bin/mirah -e "a=1;a=1+2.0;puts a"