FIR2IR converter: handle receivers and parents more correctly

This commit is contained in:
Mikhail Glukhikh
2019-05-14 15:58:50 +03:00
parent 90009f002c
commit 26974788e9
59 changed files with 400 additions and 174 deletions
+1
View File
@@ -8,6 +8,7 @@ FILE fqName:<root> fileName:/builtinMap.kt
WHEN type=kotlin.collections.Map<K1 of <root>.plus, V1 of <root>.plus> origin=IF
BRANCH
if: CALL 'public abstract fun isEmpty (): kotlin.Boolean declared in kotlin.collections.Map' type=kotlin.Boolean origin=null
$this: ERROR_CALL 'Unresolved reference: this#' type=kotlin.collections.Map<out K1 of <root>.plus, V1 of <root>.plus>
then: ERROR_CALL 'Unresolved reference: <Ambiguity: mapOf, [kotlin/collections/mapOf, kotlin/collections/mapOf]>#' type=IrErrorType
GET_VAR 'pair: kotlin.Pair<K1 of <root>.plus, V1 of <root>.plus> declared in <root>.plus' type=kotlin.Pair<K1 of <root>.plus, V1 of <root>.plus> origin=null
BRANCH
-7
View File
@@ -1,7 +0,0 @@
FILE fqName:<root> fileName:/javaMethod.kt
FUN name:test visibility:public modality:FINAL <> (j:<root>.J) returnType:kotlin.Unit
VALUE_PARAMETER name:j index:0 type:<root>.J
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test (j: <root>.J): kotlin.Unit declared in <root>'
CALL 'public open fun bar (): kotlin.Unit declared in <root>.J' type=kotlin.Unit origin=null
+1
View File
@@ -6,5 +6,6 @@ public class J {
}
// FILE: javaMethod.kt
// FIR_IDENTICAL
fun test(j: J) = j.bar()
@@ -1,7 +0,0 @@
FILE fqName:<root> fileName:/javaNestedClass.kt
FUN name:test visibility:public modality:FINAL <> (jj:<root>.J.JJ) returnType:kotlin.Unit
VALUE_PARAMETER name:jj index:0 type:<root>.J.JJ
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test (jj: <root>.J.JJ): kotlin.Unit declared in <root>'
CALL 'public open fun foo (): kotlin.Unit declared in <root>.J.JJ' type=kotlin.Unit origin=null
+1
View File
@@ -10,4 +10,5 @@ public class J {
// FILE: javaNestedClass.kt
// FIR_IDENTICAL
fun test(jj: J.JJ) = jj.foo()
@@ -1,7 +0,0 @@
FILE fqName:<root> fileName:/kotlinInnerClass.kt
FUN name:test visibility:public modality:FINAL <> (inner:<root>.Outer.Inner) returnType:kotlin.Unit
VALUE_PARAMETER name:inner index:0 type:<root>.Outer.Inner
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test (inner: <root>.Outer.Inner): kotlin.Unit declared in <root>'
CALL 'public final fun foo (): kotlin.Unit declared in <root>.Outer.Inner' type=kotlin.Unit origin=null
+1
View File
@@ -10,4 +10,5 @@ class Outer {
}
// FILE: kotlinInnerClass.kt
// FIR_IDENTICAL
fun test(inner: Outer.Inner) = inner.foo()
+1
View File
@@ -3,6 +3,7 @@ FILE fqName:<root> fileName:/simple.kt
FIELD PROPERTY_BACKING_FIELD name:test type:kotlin.Int visibility:public [final,static]
EXPRESSION_BODY
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CONST Int type=kotlin.Int value=2
other: CONST Int type=kotlin.Int value=2
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test> visibility:public modality:FINAL <> () returnType:kotlin.Int
correspondingProperty: PROPERTY name:test visibility:public modality:FINAL [val]