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

Specification: Assignment clarification #34458

Closed
eernstg opened this issue Sep 13, 2018 · 1 comment
Closed

Specification: Assignment clarification #34458

eernstg opened this issue Sep 13, 2018 · 1 comment
Labels
area-specification type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@eernstg
Copy link
Member

eernstg commented Sep 13, 2018

In dartLangSpec.tex, section 'Assignment', it is specified for v = e that we consider the innermost declaration D whose name is v or v=, and that 'it is a compile-time error if the static type of e may not be assigned to the static type of v'; but if D is a setter it makes no sense to talk about 'the static type of v', it would have to be the declared type of its formal parameter. So the current spec needs some fixes, and many of the fixes in this section have been made in CL 51323.

However, the wording in 51323 still needs to be adjusted: (1) We must still talk about "the innermost declaration named v or v=, if it exists" in order to preserve the semantics ("keeping getters and setters together as a pair"), and (2) we must name the chosen declaration (call it d), and (3) we must refer to d at each step, considering all kinds that it could have.

For instance, we specify that 'It is a compile-time error if d denotes a prefix object, type declaration, or function declaration', but that should be in the static analysis part, and it is currently in the dynamic semantics part. In the dynamic semantics, we should just say that "ignore: it's an error, won't run".

@eernstg eernstg added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) area-specification labels Sep 13, 2018
@eernstg eernstg added this to To do in Dart Language Specification via automation Sep 13, 2018
@eernstg eernstg moved this from To do to In progress in Dart Language Specification Nov 13, 2019
@eernstg
Copy link
Member Author

eernstg commented Nov 13, 2019

Closing: This topic has been completely rewritten in commit 8fa22ea447303d5a544b1762c4bb5366b8634db9, and the under-specified cases have been resolved.

@eernstg eernstg closed this as completed Nov 13, 2019
Dart Language Specification automation moved this from In progress to Done Nov 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-specification type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Development

No branches or pull requests

1 participant