Introduce IrFunctionExpression IR element

Use it to represent proper function expressions (lambdas and anonymous
functions).
This commit is contained in:
Dmitry Petrov
2019-07-15 10:42:50 +03:00
parent 022275b781
commit ed2b4a8bec
40 changed files with 131 additions and 133 deletions
@@ -35,12 +35,11 @@ FILE fqName:<root> fileName:/objectReferenceInClosureInSuperConstructorCall.kt
CONSTRUCTOR visibility:private <> () returnType:<root>.Test [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> (lambda: kotlin.Function0<kotlin.Any>) [primary] declared in <root>.Base'
lambda: BLOCK type=kotlin.Function0<<root>.Test> origin=LAMBDA
lambda: FUN_EXPR type=kotlin.Function0<<root>.Test>
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:<root>.Test
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): <root>.Test declared in <root>.Test.<init>'
GET_OBJECT 'CLASS OBJECT name:Test modality:FINAL visibility:public superTypes:[<root>.Base]' type=<root>.Test
FUNCTION_REFERENCE 'local final fun <anonymous> (): <root>.Test declared in <root>.Test.<init>' type=kotlin.Function0<<root>.Test> origin=LAMBDA
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:Test modality:FINAL visibility:public superTypes:[<root>.Base]'
PROPERTY FAKE_OVERRIDE name:lambda visibility:public modality:FINAL [val]
FIELD FAKE_OVERRIDE name:lambda type:kotlin.Function0<kotlin.Any> visibility:public [final]