Closed bagipro closed 1 year ago
@bagipro looks like this class should be inlined and use outer method generic. But because this lambda used by instance field, inline not yet supported, this mentioned in #523. I will increase priority of this case. Another issue: if class inlining is disabled or not possible, jadx needs to ignore unknown generics to make resulting code correct, this should be fixed also.
@bagipro I commit a fix for second issue: add missing type parameter declarations, code should be correct now :slightly_smiling_face:
Ok, I implement class inlining by instance field :tada:
Although for Kotlin lambdas it changes code semantic by removing extend of kotlin.jvm.internal.Lambda
class, this class hold arity
property and used somewhere in Kotlin runtime. After some checks I think it is safe to perform inline, but just in case I add option to disable of inling Kotlin lambdas: --no-inline-kotlin-lambda
in cli and Allow to inline Kotlin Lambdas
in gui.
Hey!
APK: https://drive.google.com/file/d/1NEIPWFwukzv1BgJDHpaqKZAznMf25lqW/view?usp=sharing
Jadx generates a lot of type declarations without specifying parametrized types, such as
kotlin.sequences.SequencesKt___SequencesKt$zipWithNext$1
:Another example is in class
androidx.collection.SparseArrayKt$keyIterator$1
:All
T
types here are undefined. It breaks all code logic such as inherited methods