ericmckean / traceur-compiler

Automatically exported from code.google.com/p/traceur-compiler
Apache License 2.0
0 stars 0 forks source link

Method definitions should not have [[Construct]] #209

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The same as #208.

    var obj = {
      method() { console.log("foo"); }
    };

    new obj.method();

becomes

    var obj = {method: function() {
        console.log("foo");
      }};
    new obj.method();

which does not throw a TypeError, which it should since FunctionCreate is 
called but not MakeConstructor.

Original issue reported on code.google.com by dome...@domenicdenicola.com on 4 Mar 2013 at 5:43