diff --git a/jode/jode/decompiler/LocalInfo.java b/jode/jode/decompiler/LocalInfo.java index b64814e..aeb0e1e 100644 --- a/jode/jode/decompiler/LocalInfo.java +++ b/jode/jode/decompiler/LocalInfo.java @@ -144,9 +144,9 @@ public class LocalInfo { } if (name == null) { if (jode.Decompiler.prettyLocals && type != null) { - name = type.getDefaultName(); + name = type.getHint().getDefaultName(); } else { - name = type.getDefaultName() + name = type.getHint().getDefaultName() + (slot >= 0 ? "_" + slot : "") + "_" + serialnr++ + "_"; isUnique = true; } @@ -158,8 +158,8 @@ public class LocalInfo { * Get the slot of this local. */ public int getSlot() { - /* The slot does not change when shadowing */ - return slot; + /* The slot may change when shadowing for anonymous locals */ + return getLocalInfo().slot; } /** diff --git a/jode/jode/expr/GetFieldOperator.java b/jode/jode/expr/GetFieldOperator.java index 433bd54..e846c3e 100644 --- a/jode/jode/expr/GetFieldOperator.java +++ b/jode/jode/expr/GetFieldOperator.java @@ -57,7 +57,7 @@ public class GetFieldOperator extends Operator { public void setOperandType(Type types[]) { if (!staticFlag) - needCast = types[0].getTop().equals(Type.tUnknown); + needCast = types[0].getHint().equals(Type.tNull); } public String toString(String[] operands) {