You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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".
The text was updated successfully, but these errors were encountered:
Closing: This topic has been completely rewritten in commit 8fa22ea447303d5a544b1762c4bb5366b8634db9, and the under-specified cases have been resolved.
In dartLangSpec.tex, section 'Assignment', it is specified for
v = e
that we consider the innermost declaration D whose name isv
orv=
, and that 'it is a compile-time error if the static type ofe
may not be assigned to the static type ofv
'; but if D is a setter it makes no sense to talk about 'the static type ofv
', 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
orv=
, 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".
The text was updated successfully, but these errors were encountered: