diff options
author | md_5 <git@md-5.net> | 2017-11-29 16:31:11 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2017-11-29 16:31:11 +1100 |
commit | 883035d097d1234f517e4418cb7328991f6df508 (patch) | |
tree | e4629b60b255dbd63408e7e1c992cd67beba62f1 /src/org/jetbrains | |
parent | 45e71011d14f9b9232e626933022490b3bde93b3 (diff) | |
download | fernflower-883035d097d1234f517e4418cb7328991f6df508.tar fernflower-883035d097d1234f517e4418cb7328991f6df508.tar.gz fernflower-883035d097d1234f517e4418cb7328991f6df508.tar.lz fernflower-883035d097d1234f517e4418cb7328991f6df508.tar.xz fernflower-883035d097d1234f517e4418cb7328991f6df508.zip |
Fix lambda param names
Diffstat (limited to 'src/org/jetbrains')
-rw-r--r-- | src/org/jetbrains/java/decompiler/main/ClassWriter.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/org/jetbrains/java/decompiler/main/ClassWriter.java b/src/org/jetbrains/java/decompiler/main/ClassWriter.java index f5c5203..6d08a90 100644 --- a/src/org/jetbrains/java/decompiler/main/ClassWriter.java +++ b/src/org/jetbrains/java/decompiler/main/ClassWriter.java @@ -133,7 +133,13 @@ public class ClassWriter { buffer.append(", "); } - String parameterName = methodWrapper.varproc.getVarName(new VarVersionPaar(index, 0)); + String typeName = ExprProcessor.getCastTypeName(md_content.params[i].copy()); + if (ExprProcessor.UNDEFINED_TYPE_STRING.equals(typeName) + && DecompilerContext.getOption(IFernflowerPreferences.UNDEFINED_PARAM_TYPE_OBJECT)) { + typeName = ExprProcessor.getCastTypeName(VarType.VARTYPE_OBJECT); + } + + String parameterName = methodWrapper.varproc.getVarName(new VarVersionPaar(index, 0, typeName, false)); buffer.append(parameterName == null ? "param" + index : parameterName); // null iff decompiled with errors firstParameter = false; |