Compute type for callable references and lambdas inside not null assertion if couldn't get already recorded type

This commit is contained in:
Victor Petukhov
2020-12-23 14:36:34 +03:00
parent 39e579db91
commit 954c9cecca
6 changed files with 293 additions and 6 deletions
+2 -2
View File
@@ -1,9 +1,9 @@
FILE fqName:<root> fileName:/kt36963.kt
FUN name:foo visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
FUN name:test visibility:public modality:FINAL <> () returnType:IrErrorType
FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.reflect.KFunction0<kotlin.Unit>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test (): IrErrorType declared in <root>'
RETURN type=kotlin.Nothing from='public final fun test (): kotlin.reflect.KFunction0<kotlin.Unit> declared in <root>'
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=kotlin.reflect.KFunction0<kotlin.Unit> origin=EXCLEXCL
<T0>: kotlin.reflect.KFunction0<kotlin.Unit>
arg0: FUNCTION_REFERENCE 'public final fun foo (): kotlin.Unit declared in <root>' type=kotlin.reflect.KFunction0<kotlin.Unit> origin=null reflectionTarget=<same>