Record synthesized implementation of PrintMembers calls object overload for string
Open
Area-Compilers
Feature - Records
- Dominant language
- C#
- Stars
- 20.7k
- Forks
- 4.3k
- PR merge metrics
- PR metrics pending
Description
See https://godbolt.org/z/c7cGhGoK1. I can't tell if this is a spec bug or a product bug. The spec seems to imply that the record implementation of PrintMembers should call
```C#
protected virtual bool PrintMembers(StringBuilder builder)
{
builder.Append(nameof(P1));
builder.Append(" = ");
builder.Append(this.P1);
return true;
}
```
In the case that `P1` is a string, overload resolution would pick the `string` overload. Instead it calls the object overload.
Contributor guide
Assessment
This issue has not been assessed yet.