-
Notifications
You must be signed in to change notification settings - Fork 23
[FIX] [IMP] Resolve property type #511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: alpha
Are you sure you want to change the base?
Conversation
|
Hi @cammarosano long time no see ! I think all "references" features are missing for now ? |
The issue: In follow_ref's main loop, popping from the front of the results Deque when meaning to replace an evaluation would not necessarily remove the correct one. In order to fix this and reduce complexity of the main loop with a moving index over a Deque, we switch to a work queue approach: - evaluations that need to be processed are pushed to and popped from the work queue, - final evaluations are pushed to the results vector. Other changes: - `acc` was renamed to `visited` for clarity. - some indentation could be reduced with `let else` constructs, improving readability.
When following symbol references, also follow functions that are properties, in addition to variables and class instances. This ensures that properties are correctly resolved to the return type of the underlying function.
b06bdd9 to
9cf1860
Compare
| // TODO: this arm can be easily merged with the one for SymType::CLASS, but | ||
| // - do we need to propagate instance = True here too (like we do for variables, but not class...)? | ||
| // - do we need to build_now for functions like we do for variables? In case yes, BuildSteps::ARCH_EVAL or VALIDATION? | ||
| // - stop_on_type, stop_on_value and max_scope apply also for this case? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be discussed with @fda-odoo
Hey @odoostan ! Good to hear from you! |
|
Hello @cammarosano After some testing, it seems "Go to definition" works fine in all cases except when used in code outside of the usual addons_path. Example:
And in the usual paths, we get kind of the opposite. Example:
|
This PR introduces:
follow_reffollow_ref, following its evaluation to its return type