[Differential] [Request, 14 lines] D3555: Create function type for lambda expressions.

flherne (Francis Herne) noreply at phabricator.kde.org
Thu Dec 1 00:47:18 UTC 2016


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
  BUG: 306212
  Lambda expressions were given the type of their return expression, e.g. `lambda x: 12` has type "int".
  
  That caused calling them to get no or an incorrect return type:
  `a = (lamba x: 12)("arg")`  # a should be int, but is mixed.
  
  They should have a function type instead.

TEST PLAN
  Fixes one test. No test regressions.
  
  TODO: Add more tests, stress-testing on real projects. It's after midnight here, too...

REPOSITORY
  R53 KDevelop: Python Support

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

AFFECTED FILES
  duchain/expressionvisitor.cpp
  duchain/expressionvisitor.h
  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/20161201/bb7656f7/attachment.html>


More information about the KDevelop-devel mailing list