Kray-G/kinx

Pin operator doesn't work correctly in declation & function arguments.

Kray-G opened this issue · 0 comments

Here is the code.

var a = 10;
var { x: ^a, y } = { x: 100, y: 100 };
System.println(y);

Here is a version of function arguments.

var a = 10;
function test({ x: ^a, y }) {
    return y;
}
System.println(test({ x: 10, y: 100 }));
System.println(test({ x: 100, y: 100 }));

It is okay when it's an assignment statement.