Option to not inline inner classes?
See original GitHub issueHi, I’m the dexpatcher user that started the discussion in https://github.com/DexPatcher/dexpatcher-tool/issues/33
Thanks so much for the patch made in response to that!
I’m testing out a build from master with that, hoping to compare the difference with the new checks vs --usesignatures
however I’m running into some decompilation failures with other parts of the app.
The new issue seems to be caused by an inner class (obfuscated to the name a06$a) being inlined.
One of this inner class’ functions then tries to create an instance of itself and cfr responds with ig62 = new /* invalid duplicate definition of identical inner class */;
I more often work with jadx with the arg --no-inline-anonymous
to keep inline classes in their separate named form. The decompilation from that looks a little like:
public final class a06 extends td {
public static final class a extends sf6 implements ig6<il6, xe6<? super cd6>, Object> {
public final xe6<cd6> create(Object obj, xe6<?> xe6) {
a aVar = new a(this.this$0, this.$block, xe6);
}
}
}
However cfr is inlining the inner class a
into the outer class function that uses it.
public final class a06 extends td {
public final rm6 a(hg6<? super xe6<? super List<DebugFirmwareData>>, ? extends Object> hg62) {
return gk6.b((il6)jl6.a((af6)zl6.a()), null, null, (ig6)new ig6<il6, xe6<? super cd6>, Object>((a06)this, hg62, null){
public final xe6<cd6> create(Object object, xe6<?> ig62) {
ig62 = new /* invalid duplicate definition of identical inner class */;
}
}
}
}
Is there an arg for CFR to not inline inner classes? I’ve tried a lot from --help
but haven’t found anything that works.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
Hi, no pressure on backlog I know exactly what it’s like!
I seem to have crafted a test case that represents it, I think the key features are the inner class with a function that needs to create another instance of the same inner class. jadx:
cfr:
jar attached 😃 testcase-inner-recursive.zip
Very interesting, I wonder how the original code was generated this way! Thanks for the added options though, that sounds perfect. I’ll give them a try next time I rework my project!