analyzer: Attribute transparent getproperty field errors#794
Merged
Conversation
A missing property accessed through a custom `getproperty` fallback like `getfield(o, s)` was reported at the fallback implementation instead of the user-written property access. Detect direct transparent `getproperty` forwarding in the failing `getfield` frame. When the receiver and field name come from the `getproperty` arguments, attribute the `FieldErrorReport` to the caller while keeping the origin frame available as related information. The first version intentionally handles only direct same-frame forwarding plus simple SSA copies. Helper-function forwarding is left for follow-up work. Added analyzer tests for transparent forwarding, implementation typos, and helper forwarding. Closed #469. Co-Authored-By: GPT-5.5 <noreply@openai.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #794 +/- ##
==========================================
- Coverage 78.33% 78.30% -0.04%
==========================================
Files 62 62
Lines 12892 12928 +36
==========================================
+ Hits 10099 10123 +24
- Misses 2793 2805 +12
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A missing property accessed through a custom
getpropertyfallback likegetfield(o, s)was reported at the fallback implementation instead of the user-written property access.Detect direct transparent
getpropertyforwarding in the failinggetfieldframe. When the receiver and field name come from thegetpropertyarguments, attribute theFieldErrorReportto the caller while keeping the origin frame available as related information.The first version intentionally handles only direct same-frame forwarding plus simple SSA copies. Helper-function forwarding is left for follow-up work. Added analyzer tests for transparent forwarding, implementation typos, and helper forwarding.
Closed #469.