Fixes #2331 -- bound 'super' regression

This commit is contained in:
Jeremy Ashkenas
2012-05-15 12:30:51 -04:00
parent 8dcbe54e55
commit e3454ed7fb
3 changed files with 20 additions and 6 deletions

View File

@@ -525,7 +525,8 @@ exports.Call = class Call extends Base
# The appropriate `this` value for a `super` call.
superThis : (o) ->
o.scope.method?.context or "this"
method = o.scope.method
(method and not method.klass and method.context) or "this"
# Soaked chained invocations unfold into if/else ternary structures.
unfoldSoak: (o) ->