ericmckean / traceur-compiler

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

remove function name binding in constructor class output #139

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Today this code:

class Foo {
  constructor() {}
};

Generates the following:

var Foo = traceur.runtime.createClass({ constructor: function Foo() { } }, 
null, true, false); 

It should, instead, generate something like:

var Foo = traceur.runtime.createClass({ constructor: function() { } }, null, 
true, false); 

Original issue reported on code.google.com by slightly...@google.com on 15 Oct 2012 at 5:00

GoogleCodeExporter commented 9 years ago
I think the following is also broken at the moment

var x = class y {
  m() {
    return y;
  }
}

Class expressions bind the name inside the class body (just like function 
expressions).

Original comment by arv@chromium.org on 15 Oct 2012 at 5:42

GoogleCodeExporter commented 9 years ago

Original comment by slightly...@google.com on 17 Oct 2012 at 10:15