-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Open
Labels
Area-CompilersFeature - Nullable Reference TypesNullable Reference TypesNullable Reference TypesFeature - RecordsRecordsRecords
Milestone
Description
Version Used:
master
Steps to Reproduce:
Expected Behavior:
public override bool Equals(object? obj)
{
return Equals(obj as C);
}
Actual Behavior:
public override bool Equals(object obj)
{
return Equals(obj as C);
}
[jcouv update:] more broadly we should emit nullability expectations for bool Equals(R? other) and Type EqualityContract { get; } and R? <Clone>$() and void Deconstruct(out string? NotNullableStringProperty). And we should warn on bad user-provided methods.
Relates to #44763 (Record constructor arguments should propagate nullability to properties)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Area-CompilersFeature - Nullable Reference TypesNullable Reference TypesNullable Reference TypesFeature - RecordsRecordsRecords