opprop / checker-framework-inference

Inference of pluggable types for Java
6 stars 13 forks source link

Remove usage of deprecated fromNewClass method #403

Closed al3xliu closed 2 years ago

al3xliu commented 2 years ago

In this PR, I overrided the method fromNewClass in InferenceAnnotatedTypeFactory, adding enclosing type into AnnotatedDeclaredType of a class, this can solve the problem of this pr: https://github.com/opprop/checker-framework-inference/pull/395.

This PR also removes the deprecated usage of fromNewClass, where the logic is similar to https://github.com/eisop/checker-framework/blob/b8b16a34a6e6d6a4621964ad4a1b2ed69fac5ddc/framework/src/main/java/org/checkerframework/framework/type/AnnotatedTypeFactory.java#L2670

I have tested all test cases including downstream tests in my local environment.

If it makes sense, PR https://github.com/eisop/checker-framework/pull/267 should be merged first because it dependents on it.

wmdietl commented 2 years ago

The PR got closed because the branch into which this wanted to merge got deleted. Please re-open against master.