eisop / checker-framework

Pluggable type-checking for Java
https://eisop.github.io/
Other
15 stars 16 forks source link

LowerBoundATF and UpperBoundATF logic difference in addComputedTypeAnnotations #800

Open Ao-senXiong opened 1 week ago

Ao-senXiong commented 1 week ago

Look into why there is extra condition tree instanceof LiteralTree apply for LowerBoundATF https://github.com/eisop/checker-framework/blob/4716f84259c2b87cccccefdeb7c03d23e7b2e09e/checker/src/main/java/org/checkerframework/checker/index/lowerbound/LowerBoundAnnotatedTypeFactory.java#L206, but this condition does not apply to UpperBoundATF https://github.com/eisop/checker-framework/blob/4716f84259c2b87cccccefdeb7c03d23e7b2e09e/checker/src/main/java/org/checkerframework/checker/index/upperbound/UpperBoundAnnotatedTypeFactory.java#L263

_Originally posted by @wmdietl in https://github.com/eisop/checker-framework/pull/796#discussion_r1657996403_