I have this code in LiveScript (1.1.1):
class A
b = -> { a: 1 b: 2 }
It compiles into this:
var A;
A = (function(){
A.displayName = 'A';
var b, prototype = A.prototype, constructor = A;
b = function(){
return prototype.a = 1, prototype.b = 2, prototype;
};
function A(){}
return A;
}());
Why does b() modify prototype? I expected it to just return a { a: 1, b: 2 }
associative array.
It's because of this : https://github.com/gkz/LiveScript/commit/d49b3ee8e8e2d5d7b9f128fa98c210b582e095fe
Which should probably be removed then, mmh.