Record overrides are overridden #4135
-
VS2019 v16.8.1 overrides are either ignored or overridden by the compiler in records. Steps to Reproduce:
Create a record that extends this base record: Expected Behavior:
Actual Behavior: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 12 replies
-
I believe the current behavior is known to be expected. So I think this needs a language design review; or probably this scenario could be a good candidate for a source generator. |
Beta Was this translation helpful? Give feedback.
-
I've converted this to a discussion on csharplang, as the record feature is behaving exactly as expected here and it is not a bug. As we discussed in discord, you probably just want a |
Beta Was this translation helpful? Give feedback.
I've converted this to a discussion on csharplang, as the record feature is behaving exactly as expected here and it is not a bug. As we discussed in discord, you probably just want a
class
that can inherit from arecord
, which will hopefully be coming in C# next.