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
We are overriding GenericAnnotatedTypeFactory#postAnalyze and analyzing the CFG for test(). Given the AssignmentNoden for Foo foo = makeFoo(), we invoke GenericAnnotatedTypeFactory.getStoreAfter(n) and expect to find an entry in the CFStore for foo. But, foo is missing from the store. Interestingly, if we invoke getAnnotatedType(n.getTree()) we do get the expected type for foo. We would expect this same type to be in the store immediately after the statement.
This issue was observed within the Object Construction Checker. Example:
We are overriding
GenericAnnotatedTypeFactory#postAnalyze
and analyzing the CFG fortest()
. Given theAssignmentNode
n
forFoo foo = makeFoo()
, we invokeGenericAnnotatedTypeFactory.getStoreAfter(n)
and expect to find an entry in theCFStore
forfoo
. But,foo
is missing from the store. Interestingly, if we invokegetAnnotatedType(n.getTree())
we do get the expected type forfoo
. We would expect this same type to be in the store immediately after the statement.To reproduce, check out this branch:
https://github.com/msridhar/object-construction-checker/tree/repro-store-bug
And then run:
The test will fail with a RuntimeException that is thrown when the above case is encountered.
The text was updated successfully, but these errors were encountered: