Skip to content

dotnet_style_null_propagation = true:suggestion reporting a warning  #51849

@adityapatwardhan

Description

@adityapatwardhan

Version Used: .NET 6 preview.2 SDK

Steps to Reproduce:

  1. Use .NET 6 preview.2 SDK
  2. Have the project file with <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
  3. Have code like:
return (runspacePool != null) ? (runspacePool.RemoteRunspacePoolInternal) : null;
  1. Build the console app with runtime as linux-x64 or osx-x64 for error and win7-x64 for no error.

Expected Behavior: No warning emitted.

Actual Behavior: Warning emitted only on Linux and macOS builds not Windows

Metadata

Metadata

Assignees

Labels

Area-IDEBugNeed More InfoThe issue needs more information to proceed.fabric-bot-testTesting the impact of changes to the fabric bot

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions