Mikhail Glukhikh
ca22e05acd
[FIR2IR] Support safe calls
2020-03-23 15:13:50 +03:00
Juan Chen
7249d2f889
[FIR] Fix translation of invokes & add return expressions for lambdas
...
* fixed NoSuchMethod caused by mismatched signatures of the "invoke" method generated for lambda arguments
* added test cases in invoke.kt for KFunction and anonymous functions
* added a transformer to wrap the last expression in the bodies of lambdas with return
2020-02-06 12:44:14 +03:00
Mikhail Glukhikh
0c88ecdc56
FIR resolve: introduce builtInExtensionFunctionReceiverValue
...
This commit allows us to distinguish extension lambda receivers
from simple extension receivers thus fixing some resolve problems.
2019-12-27 09:57:36 +03:00
Mikhail Glukhikh
de50f8aef3
FIR resolve: add partial support of extension lambda calls
...
Here we introduce ONLY_IMPLICIT_RECEIVER tower level
to support extension lambda calls on local variables,
and soften extension receiver checks to make such extensions visible & applicable.
Also here we try to map arguments twice for functional types
2019-12-27 09:57:36 +03:00
Dmitry Petrov
cb1b9c2ccf
IR testData: IrSimpleFunction.isOperator
2019-11-29 13:53:05 +03:00
Dmitriy Novozhilov
cadc2dfe4d
[FIR] Fix generating fir for invoke calls
2019-11-08 12:12:38 +03:00
Dmitriy Novozhilov
5c29af4b53
[FIR] Tests. Update some outdated FIR testdata
2019-09-02 10:43:10 +03:00
Mikhail Glukhikh
da22898a19
FIR2IR: set 'SetField' type to Unit, convert explicit 'this' references
2019-08-30 11:47:30 +03:00
Dmitriy Novozhilov
e3e1f3c2aa
[FIR] Fix transforming value parameters of anonymous functions
2019-08-22 14:14:55 +03:00
Dmitry Petrov
bdec8b04e8
Minor: trim in RenderIrElementVisitor
2019-07-31 10:37:35 +03:00
Mikhail Glukhikh
63b7fa70f9
FIR2IR: add extension receiver parameters to functions
2019-07-25 09:46:29 +03:00
Dmitry Petrov
ffd9b45ef3
IrFunctionExpression: add 'origin'
...
This is actually either a LAMBDA or an ANONYMOUS_FUNCTION.
Not quite sure if it's really required, but some tools such as IR-based
decompiler might require this information.
2019-07-19 11:36:19 +03:00
Dmitry Petrov
41b59f9b9a
IrFunctionExpression: update fir2ir tests
2019-07-19 11:36:19 +03:00
Mikhail Glukhikh
d96c66adac
FIR: partially implement invoke resolution
2019-07-08 16:59:37 +03:00
Mikhail Glukhikh
05e4539019
Set resolved type for lambdas properly during FIR resolve
...
Partially done by semoro
2019-05-28 10:17:31 +03:00
Mikhail Glukhikh
5262f0a53f
Fir2Ir: apply major text data update after a bunch of resolve changes
2019-04-30 18:45:57 +03:00
Dmitry Petrov
b78d1bb2b9
IrConstructorCall support in JVM_IR, JS_IR, and FIR2IR
2019-04-26 17:43:25 +03:00
Mikhail Glukhikh
881073b1c9
Add basic FIR -> IR converter with a set of text tests
...
Tests duplicate IrTextTestCaseGenerated
#KT-24065 Fixed
2019-04-05 16:18:58 +03:00