Skip to content

Commit

Permalink
Update the static extensions proposal to rely on generic constructors (
Browse files Browse the repository at this point in the history
…#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.
  • Loading branch information
eernstg authored Mar 5, 2025
1 parent 1b4215a commit 5df4fc6
Show file tree
Hide file tree
Showing 2 changed files with 488 additions and 466 deletions.
Loading

0 comments on commit 5df4fc6

Please sign in to comment.