[FIR] Implement super resolve as a particular tower resolver case

This commit is contained in:
Mikhail Glukhikh
2020-01-29 12:41:45 +03:00
parent ee020ef290
commit 71b0840ef9
42 changed files with 211 additions and 71 deletions
@@ -22,7 +22,7 @@ FILE fqName:<root> fileName:/enumWithMultipleCtors.kt
RETURN type=kotlin.Nothing from='public final fun f (): kotlin.String declared in <root>.A.Y'
CALL 'public final fun plus (other: kotlin.Any?): kotlin.String [operator] declared in kotlin.String' type=kotlin.String origin=null
$this: CALL 'public open fun f (): kotlin.String declared in <root>.A' type=kotlin.String origin=null
$this: ERROR_CALL 'Unresolved reference: super<R|A|>' type=<root>.A
$this: GET_VAR '<this>: <uninitialized parent>.<anonymous> declared in <no parent>.<anonymous>' type=<uninitialized parent>.<anonymous> origin=null
other: CONST String type=kotlin.String value="#Y"
ENUM_ENTRY name:Z
class: CLASS ENUM_ENTRY name:Z modality:FINAL visibility:local superTypes:[<root>.A]
@@ -50,7 +50,7 @@ FILE fqName:<root> fileName:/implicitNotNullOnDelegatedImplementation.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun foo (): kotlin.String declared in <root>.K2'
CALL 'public open fun foo (): kotlin.String [operator] declared in <root>.JFoo' type=kotlin.String origin=null
$this: ERROR_CALL 'Unresolved reference: super<R|JFoo|>' type=<root>.JFoo
$this: GET_VAR '<this>: <root>.K2 declared in <root>.K2.foo' type=<root>.K2 origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
@@ -93,12 +93,12 @@ FILE fqName:<root> fileName:/implicitNotNullOnDelegatedImplementation.kt
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.JUnrelatedFoo'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:K4 modality:FINAL visibility:public superTypes:[<root>.JUnrelatedFoo; <root>.IFoo]'
FUN name:foo visibility:public modality:FINAL <> ($this:<root>.K4) returnType:kotlin.String?
FUN name:foo visibility:public modality:FINAL <> ($this:<root>.K4) returnType:kotlin.String
$this: VALUE_PARAMETER name:<this> type:<root>.K4
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun foo (): kotlin.String? declared in <root>.K4'
CALL 'public open fun foo (): kotlin.String? [operator] declared in <root>.JUnrelatedFoo' type=kotlin.String? origin=null
$this: ERROR_CALL 'Unresolved reference: super<R|JUnrelatedFoo|>' type=<root>.JUnrelatedFoo
RETURN type=kotlin.Nothing from='public final fun foo (): kotlin.String declared in <root>.K4'
CALL 'public abstract fun foo (): kotlin.String declared in <root>.IFoo' type=kotlin.String origin=null
$this: GET_VAR '<this>: <root>.K4 declared in <root>.K4.foo' type=<root>.K4 origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
+3 -3
View File
@@ -24,7 +24,7 @@ FILE fqName:<root> fileName:/superCalls.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.Base'
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null
$this: ERROR_CALL 'Unresolved reference: super<R|kotlin/Any|>' type=kotlin.Any
$this: GET_VAR '<this>: <root>.Base declared in <root>.Base.hashCode' type=<root>.Base origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
@@ -44,7 +44,7 @@ FILE fqName:<root> fileName:/superCalls.kt
$this: VALUE_PARAMETER name:<this> type:<root>.Derived
BLOCK_BODY
CALL 'public open fun foo (): kotlin.Unit declared in <root>.Base' type=kotlin.Unit origin=null
$this: ERROR_CALL 'Unresolved reference: super<R|Base|>' type=<root>.Base
$this: GET_VAR '<this>: <root>.Derived declared in <root>.Derived.foo' type=<root>.Derived origin=null
PROPERTY name:bar visibility:public modality:FINAL [val]
FUN name:<get-bar> visibility:public modality:FINAL <> ($this:<root>.Derived) returnType:kotlin.String
correspondingProperty: PROPERTY name:bar visibility:public modality:FINAL [val]
@@ -52,7 +52,7 @@ FILE fqName:<root> fileName:/superCalls.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-bar> (): kotlin.String declared in <root>.Derived'
CALL 'public open fun <get-bar> (): kotlin.String declared in <root>.Base' type=kotlin.String origin=null
$this: ERROR_CALL 'Unresolved reference: super<R|Base|>' type=<root>.Base
$this: GET_VAR '<this>: <root>.Derived declared in <root>.Derived.<get-bar>' type=<root>.Derived origin=null
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:<root>.Base) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in <root>.Base