Skip to content
Commit a16e2de3 authored by Francis Herne's avatar Francis Herne
Browse files

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.
BUG: 306212

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
parent 297ca502
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment