Skip to content
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

[core] Failed type inference #1238

Closed
bagipro opened this issue Aug 22, 2021 · 3 comments
Closed

[core] Failed type inference #1238

bagipro opened this issue Aug 22, 2021 · 3 comments
Labels
bug Core Issues in jadx-core module

Comments

@bagipro
Copy link
Collaborator

bagipro commented Aug 22, 2021

Hi,

Class kotlin.sequences.SequencesKt___SequencesKt

    public static final <T extends Comparable<? super T>> T max(@NotNull Sequence<? extends T> sequence) {
        Intrinsics.checkParameterIsNotNull(sequence, "$this$max");
        Iterator<? extends T> it = sequence.iterator();
        if (!it.hasNext()) {
            return null;
        }
        T t = (T) ((Comparable) it.next());
        while (it.hasNext()) {
            ?? r1 = (Comparable) it.next(); // <<<
            if (t.compareTo(r1) < 0) {
                t = r1;
            }
        }
        return t;
    }

Probably there should be the same line: T r1 = (T) ((Comparable) it.next());

There are a lot of such errors in that file

APK: https://drive.google.com/file/d/1qC3tlWs9AtPBpyS6iU9kcSphLryfJOxi/view

@bagipro bagipro added bug Core Issues in jadx-core module labels Aug 22, 2021
@bagipro
Copy link
Collaborator Author

bagipro commented Apr 12, 2022

@skylot

Hey! Did you have a chance to look at this? Seems that those issues ?? r1 are still popular

@skylot
Copy link
Owner

skylot commented Apr 18, 2022

@bagipro this case fixed. Although, same class have many similar warnings, but generated code don't have unresolved types (??). Maybe I will try to fix these later.

@bagipro
Copy link
Collaborator Author

bagipro commented Apr 20, 2022

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Core Issues in jadx-core module
Projects
None yet
Development

No branches or pull requests

2 participants