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
#715 added initial checking for JSpecify subtype compatibility at assignments, but I don't think it handled passing array types as type parameters. Example:
Foo<Foo<@NullableString>[]> x = newFoo<Foo<String>[]>();
We should get an error for the above, but right now I don't think we do.
In fixing this problem, we should probably switch to using a TypeVisitor to do the checking, rather than using our own recursive routine. That way we could more cleanly handle all types of nesting.
…lassType in Generic Type invariance check (#806)
- Description: Only ClassTypes are supported for checking the invariance
of the nullability annotations for Generic types and hence TypeVisitors
and a TreeVisitor are added to handle different scenarios like for
example:
` Foo<Foo<@nullable String>[]> x = new Foo<Foo<String>[]>(); `
- Issue Number: 740
- All the tests in NullAwayJSpecifyGenericTests.java have passed for
these changes.
Fixes#740
---------
Co-authored-by: Manu Sridharan <[email protected]>
#715 added initial checking for JSpecify subtype compatibility at assignments, but I don't think it handled passing array types as type parameters. Example:
We should get an error for the above, but right now I don't think we do.
In fixing this problem, we should probably switch to using a
TypeVisitor
to do the checking, rather than using our own recursive routine. That way we could more cleanly handle all types of nesting./cc @NikitaAware
The text was updated successfully, but these errors were encountered: