Closed goto-bus-stop closed 5 years ago
Code like this:
A = class extends A {}
Is transpiled like this:
A = (function(A) { function A() { A.apply(this, arguments) } if (A) A.__proto__ = A })(A)
Which crashes:
if ( A ) A.__proto__ = A; ^ TypeError: Cyclic __proto__ value at Function.set __proto__ [as __proto__] (<anonymous>)
A possible fix could be to rename the temporary A function argument to something different if the name is already in use inside the function.
A
A = (function(A$0) { function A() { A$0.apply(this, arguments) } if (A$0) A.__proto__ = A$0 })(A)
Code like this:
Is transpiled like this:
Which crashes:
A possible fix could be to rename the temporary
A
function argument to something different if the name is already in use inside the function.