D6949: Rewrite declarationForName()
noreply at phabricator.kde.org
Thu Jul 27 16:57:28 UTC 2017
flherne created this revision.
Restricted Application added a subscriber: kdevelop-devel.
This causes the correct declaration to be found in some unusual cases that previously failed.
- Names can be used in a function body before their definition, provided that they're defined before the function is called. These weren't found unless declared at module scope.
- Class attributes from any enclosing class definition were found in default arguments. Only those from a method's parent class should be found.
- Class or instance attributes were, correctly, not directly visible inside a method body (only with `self.` or similar). They did however hide names from outer contexts.
All existing tests pass.
Add some new tests, of which four previously failed (declaration_order_func_defarg2, intermediate_vs_class/instance_attrs, top_level_vs_nested_*).
Quite a lot of manual testing.
R53 KDevelop: Python Support
To: flherne, brauch
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the KDevelop-devel