core: fix resolving the instance field in the 2nd and more nested inner class

This commit is contained in:
Anton Dyachenko
2014-09-02 20:05:15 +04:00
parent 2478fc3a1b
commit 128fe8a839
2 changed files with 96 additions and 2 deletions
@@ -129,8 +129,16 @@ public class InsnGen {
}
private void instanceField(CodeWriter code, FieldInfo field, InsnArg arg) throws CodegenException {
FieldNode fieldNode = mth.getParentClass().searchField(field);
if (fieldNode != null) {
ClassNode pCls = mth.getParentClass();
FieldNode fieldNode = pCls.searchField(field);
while ((fieldNode == null)
&& (pCls.getParentClass() != pCls) && (pCls.getParentClass() != null))
{
pCls = pCls.getParentClass();
fieldNode = pCls.searchField(field);
}
if (fieldNode != null) {
FieldReplaceAttr replace = fieldNode.get(AType.FIELD_REPLACE);
if (replace != null) {
FieldInfo info = replace.getFieldInfo();