Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bundle getter/setter names for lexical lookups (#548)
This PR is a total rewrite of the rules for lexical lookups. There's a new section about that topic, and it is used in all those locations where we previously had redundant (or slightly inconsistent) rules about that topic. Section Identifier Reference has been rewritten to use it; the section Unqualified Invocation has been rewritten to use it (which changes the rules for such calls, but the implementations already did what we are now specifying); and the section Assignment has been rewritten to use it. In general, this PR clarifies a number of parts that weren't specified (especially static analysis rules), and fixed a number of spec bugs. The main change is that getter/setter names are now consistently treated as a single target for lookups. For instance, a lookup for `x` that finds an instance setter `x=` will cause further analysis to use an instance getter `x`, and fail if there is none, even if there is a global `x` getter. This would affect expressions like `x(42)` which used to be specified to just use the global `x`. Luckily, implementations already do the consistent thing (and raise an error rather than using the global `x`).
- Loading branch information