FIR resolve: record & check implicit extension receiver type properly

This commit is contained in:
Mikhail Glukhikh
2019-05-23 12:25:14 +03:00
parent d9d582b226
commit d2bdbd8978
11 changed files with 111 additions and 49 deletions
+1 -1
View File
@@ -37,6 +37,6 @@ FILE fqName:<root> fileName:/calls.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun ext3 (x: kotlin.Int): kotlin.Int declared in <root>'
CALL 'public final fun foo (x: kotlin.Int, y: kotlin.Int): kotlin.Int declared in <root>' type=kotlin.Int origin=null
x: ERROR_CALL 'Unresolved reference: <Unresolved name: ext1>#' type=IrErrorType
x: CALL 'public final fun ext1 (): kotlin.Int declared in <root>' type=kotlin.Int origin=null
y: GET_VAR 'x: kotlin.Int declared in <root>.ext3' type=kotlin.Int origin=null
@@ -5,8 +5,7 @@ FILE fqName:<root> fileName:/extensionPropertyGetterCall.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-okext> (): kotlin.String declared in <root>'
CONST String type=kotlin.String value="OK"
FUN name:test5 visibility:public modality:FINAL <> () returnType:IrErrorType
FUN name:test5 visibility:public modality:FINAL <> () returnType:kotlin.String
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test5 (): IrErrorType declared in <root>'
ERROR_CALL 'Unresolved reference: <Unresolved name: okext>#' type=IrErrorType
RETURN type=kotlin.Nothing from='public final fun test5 (): kotlin.String declared in <root>'
CALL 'public final fun <get-okext> (): kotlin.String declared in <root>' type=kotlin.String origin=null
+3 -4
View File
@@ -48,8 +48,7 @@ FILE fqName:<root> fileName:/references.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-okext> (): kotlin.String declared in <root>'
CONST String type=kotlin.String value="OK"
FUN name:test5 visibility:public modality:FINAL <> () returnType:IrErrorType
FUN name:test5 visibility:public modality:FINAL <> () returnType:kotlin.String
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test5 (): IrErrorType declared in <root>'
ERROR_CALL 'Unresolved reference: <Unresolved name: okext>#' type=IrErrorType
RETURN type=kotlin.Nothing from='public final fun test5 (): kotlin.String declared in <root>'
CALL 'public final fun <get-okext> (): kotlin.String declared in <root>' type=kotlin.String origin=null
+1 -2
View File
@@ -9,5 +9,4 @@ FILE fqName:<root> fileName:/samAdapter.kt
ERROR_CALL 'Unresolved reference: println#' type=IrErrorType
CONST String type=IrErrorType value="Hello, world!"
FUNCTION_REFERENCE 'local final fun <anonymous> (): IrErrorType declared in <root>.test1' type=IrErrorType origin=LAMBDA
ERROR_CALL 'Unresolved reference: <Inapplicable(WRONG_RECEIVER): [kotlin/run]>#' type=IrErrorType
ERROR_CALL 'Unresolved reference: <Inapplicable(PARAMETER_MAPPING_ERROR): [kotlin/run]>#' type=IrErrorType