DIL has supported unlimited global lookup, which is in contrast with long standing `frame variable` behavior, which supports only globals from the current file. This is semantically incorrect for frame variable, and has shown to produce bugs in `dwim-print`. For these reasons, this change makes global lookup opt-out, controlled by a new `eExpressionPathOptionsDisallowGlobals` flag. For `dwim-print`, the bug manifests when a global shadows a computed property of the instance variable (`self`). As an example, if a global named `text` exists, and a property named `text` exists (ie `self.text`), then running `dwim-print text` will unexpectedly print the global, not `self.text`. rdar://174834020 Assisted-by: claude
9.9 KiB
9.9 KiB