jsx/JSX — pull request #126 by wasabiz (2013-03-20 10:21:21+00:00)
Title: infer type of return value

I just added return type inference feature to JSX. Now you can make closures without typing annoying return type signature.
```
function square (n : number) {
return n * n;
}
square(4);
```
(Argument types still need to be declared, of course)

Like Scala, any recursive function cannot be declared without its return type declared. Function assignment is also restricted. Below two samples are both ill-formed
```
function fact (n : number) {
if (n == 0) {
return 1;
} else {
return n * fact(n - 1);
}
}
```
```
var square = function (n : number) {
return n * n;
};
```

The lower example is a little bit hard to read to know that is error, so I changed the error message, too. Now jsx emits more detail error like below.
```
[t/compile_error/164.assign-untyped-function.jsx:3:19] either side of the operator should be fully type-qualified : return type not declared
var square = function (n : number) {
^
```