dotnet / dotnet/csharpstandard
15.2.4.2 Base classes
Open
type: bug
- Dominant language
- C#
- Stars
- 815
- Forks
- 99
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 16
Description
> While determining the meaning of the direct base class specification `A` of a class `B`, the direct base class of `B` is temporarily assumed to be object. Intuitively this ensures that the meaning of a base class specification cannot recursively depend on itself.
We cannot know whether the syntax is a base class specification until after the base type is bound (because we don't know if it is an interface or class), but we can't bind the base type until we know whether or not to assume, temporarily, it is `object`.
What we implement is that we assume the base type is `object` while binding the entire base clause.
Contributor guide
Assessment
This issue has not been assessed yet.