Resolve local declaration statuses & types inside bodies in FirBodyResolveTransformer

This commit is contained in:
Mikhail Glukhikh
2019-10-29 12:40:43 +03:00
parent 668a2a58be
commit 60e6d2e521
86 changed files with 857 additions and 276 deletions
@@ -34,12 +34,12 @@ FILE fqName:<root> fileName:/localClassWithOverrides.kt
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS CLASS name:Local modality:FINAL visibility:local superTypes:[IrErrorType]
CLASS CLASS name:Local modality:FINAL visibility:local superTypes:[<root>.outer.ALocal]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.outer.Local
CONSTRUCTOR visibility:public <> () returnType:<root>.outer.Local [primary]
BLOCK_BODY
ERROR_CALL 'Cannot find delegated constructor call' type=<root>.outer.Local
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Local modality:FINAL visibility:local superTypes:[IrErrorType]'
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.outer.ALocal'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Local modality:FINAL visibility:local superTypes:[<root>.outer.ALocal]'
FUN name:afun visibility:public modality:FINAL <> ($this:<root>.outer.Local) returnType:kotlin.Unit
$this: VALUE_PARAMETER name:<this> type:<root>.outer.Local
BLOCK_BODY
@@ -73,3 +73,16 @@ FILE fqName:<root> fileName:/localClassWithOverrides.kt
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:avar type:kotlin.Int visibility:private' type=kotlin.Unit origin=null
receiver: GET_VAR '<this>: <root>.outer.Local declared in <root>.outer.Local.<set-avar>' type=<root>.outer.Local origin=null
value: GET_VAR '<set-?>: kotlin.Int declared in <root>.outer.Local.<set-avar>' type=kotlin.Int origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
@@ -4,21 +4,21 @@ FILE fqName:<root> fileName:/typeParameterClassLiteral.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun classRefFun <T> (): kotlin.reflect.KClass<IrErrorType> [inline] declared in <root>'
GET_CLASS type=kotlin.reflect.KClass<IrErrorType>
ERROR_CALL 'Unresolved reference: <Unresolved name: T>#' type=IrErrorType
ERROR_CALL 'Unresolved reference: R|?|' type=IrErrorType
FUN name:classRefExtFun visibility:public modality:FINAL <T> ($receiver:kotlin.Any) returnType:kotlin.reflect.KClass<IrErrorType> [inline]
TYPE_PARAMETER name:T index:0 variance: superTypes:[]
$receiver: VALUE_PARAMETER name:<this> type:kotlin.Any
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun classRefExtFun <T> (): kotlin.reflect.KClass<IrErrorType> [inline] declared in <root>'
GET_CLASS type=kotlin.reflect.KClass<IrErrorType>
ERROR_CALL 'Unresolved reference: <Unresolved name: T>#' type=IrErrorType
ERROR_CALL 'Unresolved reference: R|?|' type=IrErrorType
PROPERTY name:classRefExtVal visibility:public modality:FINAL [val]
FUN name:<get-classRefExtVal> visibility:public modality:FINAL <> () returnType:kotlin.reflect.KClass<IrErrorType>
correspondingProperty: PROPERTY name:classRefExtVal visibility:public modality:FINAL [val]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-classRefExtVal> (): kotlin.reflect.KClass<IrErrorType> declared in <root>'
GET_CLASS type=kotlin.reflect.KClass<IrErrorType>
ERROR_CALL 'Unresolved reference: <Unresolved name: T>#' type=IrErrorType
ERROR_CALL 'Unresolved reference: R|?|' type=IrErrorType
CLASS CLASS name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Host
CONSTRUCTOR visibility:public <> () returnType:<root>.Host [primary]
@@ -31,7 +31,7 @@ FILE fqName:<root> fileName:/typeParameterClassLiteral.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun classRefGenericMemberFun <TF> (): kotlin.reflect.KClass<IrErrorType> [inline] declared in <root>.Host'
GET_CLASS type=kotlin.reflect.KClass<IrErrorType>
ERROR_CALL 'Unresolved reference: <Unresolved name: TF>#' type=IrErrorType
ERROR_CALL 'Unresolved reference: R|?|' type=IrErrorType
FUN name:classRefGenericMemberExtFun visibility:public modality:FINAL <TF> ($this:<root>.Host, $receiver:kotlin.Any) returnType:kotlin.reflect.KClass<IrErrorType> [inline]
TYPE_PARAMETER name:TF index:0 variance: superTypes:[]
$this: VALUE_PARAMETER name:<this> type:<root>.Host
@@ -39,7 +39,7 @@ FILE fqName:<root> fileName:/typeParameterClassLiteral.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun classRefGenericMemberExtFun <TF> (): kotlin.reflect.KClass<IrErrorType> [inline] declared in <root>.Host'
GET_CLASS type=kotlin.reflect.KClass<IrErrorType>
ERROR_CALL 'Unresolved reference: <Unresolved name: TF>#' type=IrErrorType
ERROR_CALL 'Unresolved reference: R|?|' type=IrErrorType
PROPERTY name:classRefGenericMemberExtVal visibility:public modality:FINAL [val]
FUN name:<get-classRefGenericMemberExtVal> visibility:public modality:FINAL <> ($this:<root>.Host) returnType:kotlin.reflect.KClass<IrErrorType>
correspondingProperty: PROPERTY name:classRefGenericMemberExtVal visibility:public modality:FINAL [val]
@@ -47,7 +47,7 @@ FILE fqName:<root> fileName:/typeParameterClassLiteral.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-classRefGenericMemberExtVal> (): kotlin.reflect.KClass<IrErrorType> declared in <root>.Host'
GET_CLASS type=kotlin.reflect.KClass<IrErrorType>
ERROR_CALL 'Unresolved reference: <Unresolved name: TV>#' type=IrErrorType
ERROR_CALL 'Unresolved reference: R|?|' type=IrErrorType
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any