-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
Area-CompilersResolution-By DesignThe behavior reported in the issue matches the current designThe behavior reported in the issue matches the current designuntriagedIssues and PRs which have not yet been triaged by a leadIssues and PRs which have not yet been triaged by a lead
Description
Version Used:
6.0.1
Steps to Reproduce:
class SomeClass
{
public string? SomeNullableString { get; set; }
}
void Foo()
{
List<SomeClass> list = new List<SomeClass>();
var query =
from item in list
where item.SomeNullableString != null
select Bar(item.SomeNullableString);
}
string Bar(string someNonNullableString)
{
return someNonNullableString;
}
Expected Behavior:
The select Bar(item.SomeNullableString); line should not have a CS8604 warning for the item.SomeNullableString parameter.
Actual Behavior:
It does have such warning.
This is similar to a number of other issues such as #59152 but still independently distinct as I'm not seeing an issue related specifically to query expressions.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Area-CompilersResolution-By DesignThe behavior reported in the issue matches the current designThe behavior reported in the issue matches the current designuntriagedIssues and PRs which have not yet been triaged by a leadIssues and PRs which have not yet been triaged by a lead