Problem with constructors and rest parameters?

14 views
Skip to first unread message

Michael McGlothlin

unread,
Oct 23, 2015, 10:25:41 AM10/23/15
to traceur-comp...@googlegroups.com
Using Node 4.2.1 and Traceur 0.91.

I noticed an occasional problem when trying to use code converted by Traceur. It seems like it has something to do with using non-Traceur code and trying to subclass constructors with rest parameters. It is the only place I've so far noticed a need to force Traceur'd code to only call Traceur'd code if the system natively supports ES6.



  constructor( ...args ) {
             ^

TypeError: Class constructors cannot be invoked without 'new'

...

    at Module._compile (module.js:435:26)
    at Object.Module._extensions..js (module.js:442:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Function.Module.runMain (module.js:467:10)
    at startup (node.js:134:18)
npm ERR! Test failed.  See above for more details.
Reply all
Reply to author
Forward
0 new messages