Open Ao-senXiong opened 1 week ago
I still like this change, I think removing the extra parameter is good. Can you add a changelog and also see whether the method is mentioned in the manual?
Added a changelog entry and remove document no longer useful in the manual.
Instead of removing the method we could deprecate it and implement it by setting the corresponding field, like we do in a few places. That way we wouldn't directly break anyone.
Instead of removing the method we could deprecate it and implement it by setting the corresponding field, like we do in a few places. That way we wouldn't directly break anyone.
Sure, already added back GenericAnnotatedTypeFactory#addComputedTypeAnnotations(Tree, AnnotatedTypeMirror, boolean)
in genericATF by calling the GenericAnnotatedTypeFactory#addComputedTypeAnnotations(Tree, AnnotatedTypeMirror)
inside it. I think we will have less code duplication in this way. Also updated the changelog.
You say
I think we will have less code duplication in this way.
What do you mean? How does the deprecation avoid duplication?
I have adapted this method addComputedTypeAnnotations( Tree tree, AnnotatedTypeMirror type, boolean iUseFlow)
to call addComputedTypeAnnotations(Tree tree, AnnotatedTypeMirror type)
in its body instead of have two methods with very similar method body.
Hi @wmdietl, could you review the PR and see how do you like the code change now?
Cherry-pick from https://github.com/opprop/checker-framework/pull/215, we can close that PR after merge this one.