Lambda expression improvements.

Authored by flherne on Dec 1 2016, 12:26 AM.

Description

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

Details

Committed
flherneDec 27 2016, 8:53 PM
Differential Revision
D3555: Create function type for lambda expressions.
Parents
R53:297ca502bfaa: Add hints at correct vararg index with explicit self argument.
Branches
Unknown
Tags
Unknown