[Differential] [Request, 42 lines] D4207: Very basic property getter support

Francis Herne noreply at phabricator.kde.org
Thu Jan 19 19:41:39 UTC 2017


flherne created this revision.
flherne added a reviewer: brauch.
flherne set the repository for this revision to R53 KDevelop: Python Support.
Restricted Application added a subscriber: kdevelop-devel.

REVISION SUMMARY
  Just replace property functions with their return type in `ExpressionVisitor::visitCall()`.
  
  This only works for getter-only properties - if there's a setter function for the property (which idiomatically has the same name), `visitCall()` finds that declaration instead and gives the wrong return type.
  
  Still, it's useful in a good proportion of cases.
  
  To make this work properly, I think we need a specific declaration type for properties, and to update that when visiting the getter/setter instead of creating the function declarations directly in the class?

TEST PLAN
  One new test fail->pass.
  Two new tests still fail.
  No test regressions.

REPOSITORY
  R53 KDevelop: Python Support

REVISION DETAIL
  https://phabricator.kde.org/D4207

AFFECTED FILES
  duchain/expressionvisitor.cpp
  duchain/tests/pyduchaintest.cpp

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: flherne, brauch
Cc: kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20170119/532ddacb/attachment.html>


More information about the KDevelop-devel mailing list