-
Notifications
You must be signed in to change notification settings - Fork 299
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Handles cases in JSpecify mode where a `@Nullable` element is assigned to an unannotated array. Added relevant unit tests. **Current Behavior** Both are valid assignments. ``` String [] foo = new String[10]; @nullable String [] bar = new String [10]; foo[1] = null; bar[1] = null; ``` **New Behavior** Assignment to `foo` generates an error since array elements are `@Nonnull`. ``` String [] foo = new String[10]; @nullable String [] bar = new String [10]; foo[1] = null; bar[1]=null; ``` --------- Co-authored-by: Manu Sridharan <[email protected]>
- Loading branch information
1 parent
1c497a7
commit e3a3c76
Showing
3 changed files
with
103 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters