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
@smillst Using assignment context seems to have a problem with caching. If the caching is only disabled in dataflow, the nullness checker will crush when checking https://github.com/typetools/checker-framework/blob/master/framework/tests/all-systems/Issue2302.java.
When visiting the return part in InitializationAnnotatedTypeFactory::visitNewClass (node=new StrangeConstructorTypeArgs(new MyClass<>())), the type of the assignment context is: Pair(StrangeConstructorTypeArgs, @Initialized @NonNull StrangeConstructorTypeArgs<V extends @Initialized @Nullable Object>), which is not good enough for MyClass<>(). (But I suppose it is good enough for returning value?) By using the context, the type of MyClass<>() would be resolved into MyClass<Object> and cached, which would cause a crush later when checking the arguments,
I am wondering if the context should be updated when visiting the arguments.
Btw, it does not crush on interning and regex, which not using that method to visit new class.
@smillst Using assignment context seems to have a problem with caching. If the caching is only disabled in dataflow, the nullness checker will crush when checking https://github.com/typetools/checker-framework/blob/master/framework/tests/all-systems/Issue2302.java.
When visiting the return part in InitializationAnnotatedTypeFactory::visitNewClass (node=
new StrangeConstructorTypeArgs(new MyClass<>())
), the type of the assignment context is:Pair(StrangeConstructorTypeArgs, @Initialized @NonNull StrangeConstructorTypeArgs<V extends @Initialized @Nullable Object>)
, which is not good enough forMyClass<>()
. (But I suppose it is good enough for returning value?) By using the context, the type ofMyClass<>()
would be resolved intoMyClass<Object>
and cached, which would cause a crush later when checking the arguments,I am wondering if the context should be updated when visiting the arguments.
Btw, it does not crush on interning and regex, which not using that method to visit new class.
Originally posted by @abslamp in #2807 (comment)
The text was updated successfully, but these errors were encountered: