Skip to content

Reduce cascading errors when record inherits from non-record #63270

@RikkiGibson

Description

@RikkiGibson

SharpLab

class Base { }

record Derived : Base { }

This scenario produces 5 errors (at the time this issue was filed). It seems like it would be reasonable to only produce error CS8864: Records may only inherit from object or another record in this case.

Originally posted by @RikkiGibson in #62999 (comment)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions