-
Notifications
You must be signed in to change notification settings - Fork 213
Feature specification of #3090, allowing an inline class to implement its representation type #3138
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
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lrhn
reviewed
Jun 8, 2023
working/1426-extension-types/feature-specification-implements-rep.md
Outdated
Show resolved
Hide resolved
lrhn
reviewed
Jun 8, 2023
working/1426-extension-types/feature-specification-implements-rep.md
Outdated
Show resolved
Hide resolved
working/1426-extension-types/feature-specification-implements-rep.md
Outdated
Show resolved
Hide resolved
working/1426-extension-types/feature-specification-implements-rep.md
Outdated
Show resolved
Hide resolved
working/1426-extension-types/feature-specification-implements-rep.md
Outdated
Show resolved
Hide resolved
working/1426-extension-types/feature-specification-implements-rep.md
Outdated
Show resolved
Hide resolved
working/1426-extension-types/feature-specification-implements-rep.md
Outdated
Show resolved
Hide resolved
working/1426-extension-types/feature-specification-implements-rep.md
Outdated
Show resolved
Hide resolved
working/1426-extension-types/feature-specification-implements-rep.md
Outdated
Show resolved
Hide resolved
lrhn
reviewed
Jun 8, 2023
lrhn
reviewed
Jun 9, 2023
working/1426-extension-types/feature-specification-implements-rep.md
Outdated
Show resolved
Hide resolved
working/1426-extension-types/feature-specification-implements-rep.md
Outdated
Show resolved
Hide resolved
working/1426-extension-types/feature-specification-implements-rep.md
Outdated
Show resolved
Hide resolved
working/1426-extension-types/feature-specification-implements-rep.md
Outdated
Show resolved
Hide resolved
… class which is sealed/base/final
…erface graph with different type arguments
… more than normal classes can do)
This was referenced Jun 30, 2023
Closed
scheglov
reviewed
Jul 6, 2023
working/1426-extension-types/feature-specification-implements-rep.md
Outdated
Show resolved
Hide resolved
scheglov
reviewed
Jul 6, 2023
working/1426-extension-types/feature-specification-implements-rep.md
Outdated
Show resolved
Hide resolved
Note that the proposal in this PR is included in the proposal about extension types, #3182. |
Closing: This feature has been included in the 'extension types' feature specification, so there's no need to have a separate feature specification (which is what this PR will add). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains a proposal for an addendum to the feature specification of inline classes, specifying how we could support the situation where an inline class
V
has animplements ... R
clause whereR
is the representation type (or any supertype thereof).The point is that this provides (1) the subtype relationship
V <: R
, and (2) a receiver of typeV
can have members ofR
invoked on it.In this proposal,
V
is allowed to redeclare members ofR
(which means thatV
"overrides" the implementation of that member, albeit with static dispatch only).Conflict resolution is specified to be the same as it has always been for superinterfaces: If both
R
and some other superinterface have a member with the same name then there is an error, butV
can redeclare the member and that will resolve the conflict.