"self." is only added to instance variables when compiling an instance method

This commit is contained in:
Martin Carlberg
2013-01-09 10:21:16 +01:00
parent 0a573f9da1
commit 0dd98b56bc
+1 -1
View File
@@ -692,7 +692,7 @@ MessageSendExpression: function(node, st, c) {
st.compiler.lastPos = node.end;
},
Identifier: function(node, st, c) {
if (!st.secondMemberExpression)
if (st.currentMethodType() === "-" && !st.secondMemberExpression)
{
var identifier = node.name,
lvar = st.getLvarForCurrentMethod(identifier),