Version Used: 11.0.100-alpha.1.26060.102
Steps to Reproduce:
- Remove the pragma warning disable IDE0270 here: https://github.com/dotnet/dotnet/blob/a6194a79ac71f2d3b55ac81f292d8a2c49d41f91/src/winforms/src/System.Windows.Forms/System/Windows/Forms/WindowSubclassHandler.cs#L102
- Build the winforms repo or the VMR
- Observe that IDE0270 is firing even though the code can't be simplified
Diagnostic Id: IDE0270 - Null check can be simplified
When applying the code fixer, I get the following error:
D:\a_work\1\s\src\winforms\src\System.Windows.Forms\System\Windows\Forms\WindowSubclassHandler.cs(97,31): error CS0019: Operator '??' cannot be applied to operands of type 'void*' and '' [D:\a_work\1\s\src\winforms\src\System.Windows.Forms\System.Windows.Forms.csproj]
Expected Behavior:
IDE0270 shouldn't be raised in this case when void* is used.
Actual Behavior:
IDE0270 is raised but the code fixer produces non-compliable code.
Version Used: 11.0.100-alpha.1.26060.102
Steps to Reproduce:
Diagnostic Id: IDE0270 - Null check can be simplified
When applying the code fixer, I get the following error:
Expected Behavior:
IDE0270 shouldn't be raised in this case when void* is used.
Actual Behavior:
IDE0270 is raised but the code fixer produces non-compliable code.