Rename local variable for this in inline function

This commit is contained in:
Natalia Ukhorskaya
2015-11-30 15:19:26 +03:00
parent a932315bf9
commit a1f3c5381e
5 changed files with 7 additions and 6 deletions
@@ -354,7 +354,8 @@ public class MethodInliner {
) {
if (isInliningLambda || InlineCodegenUtil.GENERATE_SMAP) {
String varSuffix = inliningContext.isRoot() && !InlineCodegenUtil.isFakeLocalVariableForInline(name) ? INLINE_FUN_VAR_SUFFIX : "";
super.visitLocalVariable(name + varSuffix, desc, signature, start, end, getNewIndex(index));
String varName = !varSuffix.isEmpty() && name.equals("this") ? name + "_" : name;
super.visitLocalVariable(varName + varSuffix, desc, signature, start, end, getNewIndex(index));
}
}
};