[Nullable ref Types] Infer throw statements from extension methods #31642
Labels
Area-Compilers
Feature - Nullable Reference Types
Nullable Reference Types
Resolution-Duplicate
The described behavior is tracked in another issue
Version Used: VisualStudio.16.int.d16.0stg/16.0.0-pre.2.0+28408.101.d16.0stg
C# Tools 2.11.0-beta2-63529-05+66aa49da81717aa54090a9e94c2f575ddb1959bb
Steps to Reproduce:
Simplified definition:
To prevent the warning you can do:
Which removes the warning. However trying to capture the check in a general-purpose extension method:
Doesn't remove the warning anymore and requires additional
!
to both array indexer and.Count
The text was updated successfully, but these errors were encountered: