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

typetools/checker-framework 3.43.0 release #1080

Merged
merged 41 commits into from
Feb 5, 2025
Merged

Conversation

wmdietl and others added 5 commits January 30, 2025 17:15
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Ernst <[email protected]>
Co-authored-by: Werner Dietl <[email protected]>
Co-authored-by: Aosen Xiong <[email protected]>
Co-authored-by: Werner Dietl <[email protected]>
Co-authored-by: Alex Liu <[email protected]>
Co-authored-by: Manu Sridharan <[email protected]>
Co-authored-by: Suzanne Millstein <[email protected]>
Co-authored-by: Manu Sridharan <[email protected]>
Co-authored-by: James Yoo <[email protected]>
Co-authored-by: Michael Ernst <[email protected]>
Co-authored-by: Pratik Bhusal <[email protected]>
Co-authored-by: Aosen Xiong <[email protected]>
Co-authored-by: Hamed Taghani <[email protected]>
Co-authored-by: Alex Liu <[email protected]>
Co-authored-by: Sanjay Malakar <[email protected]>
Co-authored-by: Markus Frohme <[email protected]>
Co-authored-by: Martin Kellogg <[email protected]>
@Ao-senXiong
Copy link
Member

This is a minimzed version test case.

public class Testminimize {
    static void foo() {
        new ImmutableSet.Builder<>()
                .add(R.c((Object o) -> null))
                .build();
    }

    static class R {
        static R c(Converter x) { return null; }
    }

    interface Converter {
        Object convert(Object o);
    }

    static class ImmutableSet<E> {
        static class Builder<E> {
            public Builder<E> add(E... elements) { return this; }
            public ImmutableSet<E> build() { return null; }
        }
    }
}

methodName,
invokedMethod.getTypeVariables());
List<AnnotatedTypeMirror> params =
AnnotatedTypes.adaptParameters(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wmdietl Why adapt the parameters again? Code at line 2024 will call this method in the body. After that adaptation, it changes invokedMethod's parameter type from AnnotatedArrayType to AnnotatedDeclaredType, adapt it again will do a cast from AnnotatedDeclaredType to AnnotatedArrayType and caused the crash.

@wmdietl wmdietl merged commit b147058 into master Feb 5, 2025
44 of 45 checks passed
@wmdietl wmdietl deleted the typetools-3.43.0-fixes branch February 5, 2025 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants