Skip to content

Records won't warn about an unimplemented abstract ToString #76554

Closed
@alrz

Description

Version Used: 98ea496

Steps to Reproduce:

abstract class ClassBase
{
    public abstract override string ToString();
    sealed class Class : ClassBase; // error
}
abstract record RecordBase
{
    public abstract override string ToString();
    sealed record Record : RecordBase; // ok (error expected)
}

Expected Behavior: error CS0534: 'RecordBase.Record' does not implement inherited abstract member 'RecordBase.ToString()'

Actual Behavior: there's no error on the record declaration.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions