You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expect that the two errors above will be issued. However, when this test is run, only the second error is issued.
In particular, the type of this in test after the end of the if statement is @CalledMethods({"toString", "equals", "call1"}) - indicating that only the then store was propagated past the end of the if block. Instead, I would expect the two stores to be LUB'd to give @CalledMethods("toString"), as occurs in the second example (test_arg()).
I don't know of any of other type system that has a postcondition annotation that can reference this besides Called Methods, so I haven't reproduced this with any other checker. However, this issue came up when trying to add postcondition inference for "this" to WPI, so I've observed it with the AinferTestChecker and I believe it would apply to any checker where postcondition annotations whose expression resolves to this makes sense.
The text was updated successfully, but these errors were encountered:
Consider the following program (checked in as
checker/tests/calledmethods/EnsuresCalledMethodsThisLub.java
on this branch: https://github.com/kelloggm/checker-framework/tree/postcondition-this-bug):I expect that the two errors above will be issued. However, when this test is run, only the second error is issued.
In particular, the type of
this
intest
after the end of theif
statement is@CalledMethods({"toString", "equals", "call1"})
- indicating that only thethen
store was propagated past the end of theif
block. Instead, I would expect the two stores to be LUB'd to give@CalledMethods("toString")
, as occurs in the second example (test_arg()
).I don't know of any of other type system that has a postcondition annotation that can reference
this
besides Called Methods, so I haven't reproduced this with any other checker. However, this issue came up when trying to add postcondition inference for "this" to WPI, so I've observed it with theAinferTestChecker
and I believe it would apply to any checker where postcondition annotations whose expression resolves tothis
makes sense.The text was updated successfully, but these errors were encountered: