Fixing class extends this in a non-class context.

This commit is contained in:
Jeremy Ashkenas
2010-12-23 10:22:52 -08:00
parent 2ec1c3b56c
commit ccfd369a77
3 changed files with 16 additions and 2 deletions

View File

@@ -841,7 +841,7 @@ exports.Class = class Class extends Base
@body.expressions.push lname
@addBoundFunctions o
klass = new Parens new Call(new Code [], @body), true
klass = new Parens Closure.wrap(@body), true
klass = new Assign @variable, klass if @variable
klass.compile o