-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Full support for "desugared" lambdas #523
Labels
Milestone
Comments
Small sample: Original class
package com.example;
import java.util.function.Function;
class TestJavaClass {
private final Function<String, String> f = x -> x;
String test() {
return f.apply("2");
}
} Smali
Decompiled class (jadx-1.5.0)
package com.example;
import java.util.function.Function;
/* loaded from: classes8.dex */
package com.example;
import java.util.function.Function;
/* loaded from: classes8.dex */
class TestJavaClass {
private final Function<String, String> f = new Function() { // from class: com.example.TestJavaClass$$ExternalSyntheticLambda0
@Override // java.util.function.Function
public final Object apply(Object obj) {
return TestJavaClass.lambda$new$0((String) obj);
}
};
TestJavaClass() {
}
/* JADX INFO: Access modifiers changed from: package-private */
public static /* synthetic */ String lambda$new$0(String x) {
return x;
}
String test() {
return this.f.apply("2");
}
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
New d8 android compiler allows to use Java 8 lambdas, but to make it work on old Android versions d8 convert (desugar) lambdas to synthetic classes and methods.
This issue continues work on lambda inlining started in #467.
Known issues:
INSTANCE
static fieldlambda$*
methods must be inlinedNote: Inlining Kotlin lambdas change code semantic by removing extend of
kotlin.jvm.internal.Lambda
. To disable such inlines use flag--no-inline-kotlin-lambda
in jadx-cli and optionAllow to inline Kotlin Lambdas
in jadx-gui.The text was updated successfully, but these errors were encountered: