diff --git a/net/loveruby/cflat/ast/VariableNode.java b/net/loveruby/cflat/ast/VariableNode.java index 7ab3c9f..bdda399 100644 --- a/net/loveruby/cflat/ast/VariableNode.java +++ b/net/loveruby/cflat/ast/VariableNode.java @@ -37,6 +37,24 @@ public class VariableNode extends LHSNode { entity = ent; } + /*============================================== + = fix constant entity bug = + ==============================================*/ + public boolean isLvalue() { + if (entity.isConstant()) { + return false; + } + return true; + } + + public boolean isAssignable() { + if (entity.isConstant()) { + return false; + } + return isLoadable(); + } + /*===== End of fix constant entity bug ======*/ + public TypeNode typeNode() { return entity().typeNode(); }