Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[extension types] Member conflicts ignore precluded members #3486

Merged
merged 2 commits into from
Dec 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -906,8 +906,9 @@ On the other hand, it can occur in other ways, e.g., as a type argument of
a superinterface of a class.*

It is a compile-time error if _DV_ is an extension type declaration, and
_DV_ has a non-extension type member named `m` as well as an extension type
member named `m`, for any `m`. *In case of conflicts, _DV_ must declare a
_DV_ has a non-extension type member named `m` which is not precluded by
_DV_ as well as an extension type member named `m` which is not precluded
by _DV_, for any `m`. *In case of conflicts, _DV_ must declare a
member named `m` to resolve the conflict.*

It is a compile-time error if _DV_ is an extension type declaration, and
Expand All @@ -918,8 +919,8 @@ conflict.*

A compile-time error occurs if an extension type declaration _DV_ has
two extension type superinterfaces `V1` and `V2`, and both `V1` and `V2`
has an extension type member named `m`, and the two members have distinct
declarations.
has an extension type member named `m` that is not precluded by _DV_, and
the two members have distinct declarations.

*In other words, an extension type member conflict is always an error, even
in the case where they agree perfectly on the types. _DV_ must override the
Expand Down