From 1729fac3605d6649919ee508bcf8b03f904886f4 Mon Sep 17 00:00:00 2001 From: Oliver Buchtala Date: Mon, 9 Sep 2013 12:46:07 +0300 Subject: [PATCH] Bug-fix for static variables as proposed by Kota Iguchi. Fixes #20. --- Source/Modules/javascript.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Modules/javascript.cxx b/Source/Modules/javascript.cxx index 360fb1aec..54135d852 100644 --- a/Source/Modules/javascript.cxx +++ b/Source/Modules/javascript.cxx @@ -1636,7 +1636,7 @@ int JSCEmitter::exitVariable(Node *n) { .replace(T_SETTER, state.variable(SETTER)); if (GetFlag(n, "ismember")) { - if (GetFlag(state.function(), IS_STATIC) + if (GetFlag(state.variable(), IS_STATIC) || Equal(Getattr(n, "nodeType"), "enumitem")) { Append(state.clazz(STATIC_VARIABLES), t_variable.str()); } else {