-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check Locations length before accessing (#87659)
Fixes an `IndexOutOfRangeException` thrown by the analyzer when analyzing method parameters for the implicitly generated Main method when using top-level statements. These method parameters don't have location info because they are not in user code. This also adds checks in the other places this analyzer accesses `Locations[0]`, to be safe.
- Loading branch information
Showing
8 changed files
with
109 additions
and
65 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
Oops, something went wrong.