Add feature specification of generic constructors#4265
Merged
Conversation
eernstg
added a commit
that referenced
this pull request
Mar 5, 2025
…#4212) Rename 'feature-specification-variant2.md' to 'feature-specification.md', based on the assumption that this proposal is more likely to have broad support than the other proposal. This PR rewrites the contents of that feature specification such that it relies on generic constructors #4265, which simplifies the proposal significantly. It can be adjusted to work with other proposals about generic constructors. The mest perspicuous simplification is the following: If multiple accessible extension declarations with on-declaration `C` declare a constructor named `C.name` (or named `C`), and `C` itself doesn't declare such a constructor then an invocation of `C.name(...)` (respectively `C(...)`), as well as variants with actual type arguments, is an error because of the ambiguity. No attempt is made to determine that some extensions are "more specific" than others.
7aae602 to
4cb6a22
Compare
4cb6a22 to
427c5b7
Compare
427c5b7 to
a32697a
Compare
Member
Author
|
I'll land this because it's in the 'working' directory. Discussions about details can be handled in further PRs. |
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
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.
Here is a first version of said feature specification, based on the proposal in #4213.