TypL
TypL copied to clipboard
Another example of Typl inference
function foo(v) {
return v;
}
var x = foo(2);
x = "hello"; // error: expected 'int' but found 'string'
function foo(v) {
return v;
}
var x = foo(2);
x = "hello"; // error: expected 'int' but found 'string'