Skip to content

super function call with spread argument

Trying to fix #129 (closed).

Here again the problem description: Transpilation of super.function(...args) calls is broken. The problem is that super.foo(...args) gets transpiled into something like (ref = A.prototype).foo.apply.call(this, ref, args)

My solution:

  1. Added a test case.
  2. CallExpression: Done in the same way as you treat super() calls, detecting cases like 'super.foo', and setting superNode.noCall

Let me know if you think this is an adequate approach.

Merge request reports