https://bugs.kde.org/show_bug.cgi?id=306212

Francis Herne <m...@flherne.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|                            |https://commits.kde.org/kde
                   |                            |v-python/a16e2de3f089fa5f13
                   |                            |046fad4ea934d33e9bd128
         Resolution|---                         |FIXED
             Status|CONFIRMED                   |RESOLVED

--- Comment #2 from Francis Herne <m...@flherne.uk> ---
Git commit a16e2de3f089fa5f13046fad4ea934d33e9bd128 by Francis Herne.
Committed on 27/12/2016 at 20:53.
Pushed by flherne into branch '5.1'.

Lambda expression improvements.

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 = (lambda x: 12)("arg")`  # a should be int, but is mixed.

They should have a function type instead.

`*args` or `**kwargs` arguments to a lambda were shown as undefined in
 the return expression:
 `lambda *args, **kwargs: args[1] + kwargs["foo"]`

Fixes one test.

Differential Revision: https://phabricator.kde.org/D3555

M  +6    -0    duchain/declarationbuilder.cpp
M  +12   -0    duchain/expressionvisitor.cpp
M  +1    -0    duchain/expressionvisitor.h
M  +0    -1    duchain/tests/pyduchaintest.cpp

https://commits.kde.org/kdev-python/a16e2de3f089fa5f13046fad4ea934d33e9bd128

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to