Protean-Labs / mesh

The Mesh Engine that implements the Mesh Language, a computational language for web3.
Apache License 2.0
1 stars 0 forks source link

Handle binding overshadowing in function scopes #48

Closed ThierryBleau closed 3 years ago

ThierryBleau commented 3 years ago
let x = 1;
let y = 2;

let f = (x, y) => {
    let x = ();
    let y = [];
    (x,y); 
};
f(1);

Returns type error when unifying TConst("int") and TConst("unit").

We do have expected behavior outside of function scopes however.

let x = 1;
let x = "hello";

x;

Returns x : TConst("string:)