Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chrome 38 : TypeError: Constructor Map requires 'new' #1413

Open
lgersman opened this issue Oct 14, 2014 · 1 comment
Open

Chrome 38 : TypeError: Constructor Map requires 'new' #1413

lgersman opened this issue Oct 14, 2014 · 1 comment

Comments

@lgersman
Copy link

The code generated by Traceur will no more run in current Chrome browser version 38 when you derive from class Map (which is natively available at this version). In Firefox (version 30, supports also native ES6 Maps) everything works fine ...

class MyMap extends Map {
  constructor() {
    super();
  }
}

will result in

"TypeError: Constructor Map requires 'new'
    at MyMap.Map (native)
    at Object.superCall 
    ....

You can try it live here :

Example : http://jsbin.com/rucoy/4/edit?html,js,console

Is that a bug of Traceur or the Chrome implementation of Map ?

@arv
Copy link
Collaborator

arv commented Oct 14, 2014

Little bit of both.
V8 does not yet support extending builtins and Traceur is not trying to work around this limitation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants