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

Specify precisely where it is an error to declare an initializing formal #3517

Merged
merged 4 commits into from
Dec 18, 2023

Conversation

eernstg
Copy link
Member

@eernstg eernstg commented Dec 15, 2023

The compile-time error which is reported by the common front end for a declaration of a formal parameter as an initializing formal (this.name) was not specified precisely until now (it was just mentioned in commentary and never spelled out in normative text).

This PR changes the commentary to normative text.

One question may still give rise to debate: Can external constructors have initializing formals? This would be an enhancement, and it is handled in #3516. If that enhancement is accepted then we will change the specification later on in a different PR—this PR just specifies the current situation and makes it an error.

There will be an implementation effort in any case: If this PR is landed and the error reported by the CFE follows the updated specification then the analyzer would need to be changed to report that error. If an enhancement is accepted then all tools would need to implement it.

@eernstg eernstg requested a review from natebosch December 15, 2023 11:45
@eernstg eernstg force-pushed the specify_initializing_formal_error_dec23 branch from db1018c to 3572afa Compare December 15, 2023 11:57
specification/dartLangSpec.tex Outdated Show resolved Hide resolved
Apply natural language logical operator to property rather than entity (is less verbose).

Co-authored-by: Nate Bosch <[email protected]>
@eernstg eernstg merged commit 5b30890 into main Dec 18, 2023
4 checks passed
@eernstg eernstg deleted the specify_initializing_formal_error_dec23 branch December 18, 2023 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants