-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify class member conflict rules.
As of patchset 5: The ruleset concerning class member conflicts (apart from simple name clashes) has now been simplified considerably, and it's expressed in one location, in a new section (the locations where we previously had such rules are now `\commentary{}` with a reference to the new section). The old rules and the new simplified rules specify the same set of conflicts (in that sense, patchset 4 == patchset 5). The old description below gives details about what was changed from the start of this CL until patchset 4. ------------------------------- OLD description: Added conflict for constructor and setter with "the same name". Discussed the inconsistent approach to conflicts between named constructors and instance members with Lasse; we agreed that it is confusing if we allow the constructor `C.n` to coexist with the instance method/getter `n` and instance setter `n=`, except that they must be inherited rather than declared in the enclosing class `C`, so I adjusted the wording such that only _static_ members conflict with named constructors. One more reason why there is no conflict between `C.n` and an instance member named `n` or `n=` is that the latter can _never_ be denoted by `C.n` (but static members can be denoted by `C.n`, also in `C`). Change-Id: I012e772ae6473fddd8f9944553d69e6a6ceeb2f9 Reviewed-on: https://dart-review.googlesource.com/56800 Reviewed-by: Leaf Petersen <leafp@google.com> Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
- Loading branch information
Showing
1 changed file
with
49 additions
and
47 deletions.
There are no files selected for viewing
This file contains 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