fix VariableNode constant entity bug

This commit is contained in:
陈梓麟 2016-08-25 21:50:27 +08:00
parent 54a2ba1db4
commit cde5ef884a
1 changed files with 18 additions and 0 deletions

View File

@ -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();
}