FIR2IR: provide type arguments for class 'this' receiver

This commit is contained in:
Juan Chen
2020-02-08 05:13:34 +03:00
committed by Mikhail Glukhikh
parent df07b77271
commit 8e35545e10
69 changed files with 660 additions and 826 deletions
@@ -1,13 +1,13 @@
FILE fqName:test fileName:/boundInnerGenericConstructor.kt
CLASS CLASS name:Foo modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:test.Foo
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:test.Foo<T of test.Foo>
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
CONSTRUCTOR visibility:public <> () returnType:test.Foo<T of test.Foo> [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Foo modality:FINAL visibility:public superTypes:[kotlin.Any]'
CLASS CLASS name:Inner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:test.Foo.Inner
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:test.Foo.Inner<P of test.Foo.Inner>
TYPE_PARAMETER name:P index:0 variance: superTypes:[kotlin.Any?]
CONSTRUCTOR visibility:public <> (a:T of test.Foo, b:P of test.Foo.Inner) returnType:test.Foo.Inner<P of test.Foo.Inner> [primary]
VALUE_PARAMETER name:a index:0 type:T of test.Foo
@@ -19,24 +19,24 @@ FILE fqName:test fileName:/boundInnerGenericConstructor.kt
FIELD PROPERTY_BACKING_FIELD name:a type:T of test.Foo visibility:private [final]
EXPRESSION_BODY
GET_VAR 'a: T of test.Foo declared in test.Foo.Inner.<init>' type=T of test.Foo origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-a> visibility:public modality:FINAL <> ($this:test.Foo.Inner) returnType:T of test.Foo
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-a> visibility:public modality:FINAL <> ($this:test.Foo.Inner<P of test.Foo.Inner>) returnType:T of test.Foo
correspondingProperty: PROPERTY name:a visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:test.Foo.Inner
$this: VALUE_PARAMETER name:<this> type:test.Foo.Inner<P of test.Foo.Inner>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-a> (): T of test.Foo declared in test.Foo.Inner'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a type:T of test.Foo visibility:private [final]' type=T of test.Foo origin=null
receiver: GET_VAR '<this>: test.Foo.Inner declared in test.Foo.Inner.<get-a>' type=test.Foo.Inner origin=null
receiver: GET_VAR '<this>: test.Foo.Inner<P of test.Foo.Inner> declared in test.Foo.Inner.<get-a>' type=test.Foo.Inner<P of test.Foo.Inner> origin=null
PROPERTY name:b visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:b type:P of test.Foo.Inner visibility:private [final]
EXPRESSION_BODY
GET_VAR 'b: P of test.Foo.Inner declared in test.Foo.Inner.<init>' type=P of test.Foo.Inner origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-b> visibility:public modality:FINAL <> ($this:test.Foo.Inner) returnType:P of test.Foo.Inner
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-b> visibility:public modality:FINAL <> ($this:test.Foo.Inner<P of test.Foo.Inner>) returnType:P of test.Foo.Inner
correspondingProperty: PROPERTY name:b visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:test.Foo.Inner
$this: VALUE_PARAMETER name:<this> type:test.Foo.Inner<P of test.Foo.Inner>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-b> (): P of test.Foo.Inner declared in test.Foo.Inner'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:b type:P of test.Foo.Inner visibility:private [final]' type=P of test.Foo.Inner origin=null
receiver: GET_VAR '<this>: test.Foo.Inner declared in test.Foo.Inner.<get-b>' type=test.Foo.Inner origin=null
receiver: GET_VAR '<this>: test.Foo.Inner<P of test.Foo.Inner> declared in test.Foo.Inner.<get-b>' type=test.Foo.Inner<P of test.Foo.Inner> 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
@@ -1,25 +1,25 @@
FILE fqName:<root> fileName:/genericMember.kt
CLASS CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.A
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.A<T of <root>.A>
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
CONSTRUCTOR visibility:public <> () returnType:<root>.A<T of <root>.A> [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Any]'
FUN name:foo visibility:public modality:FINAL <> ($this:<root>.A) returnType:kotlin.Unit
$this: VALUE_PARAMETER name:<this> type:<root>.A
FUN name:foo visibility:public modality:FINAL <> ($this:<root>.A<T of <root>.A>) returnType:kotlin.Unit
$this: VALUE_PARAMETER name:<this> type:<root>.A<T of <root>.A>
BLOCK_BODY
PROPERTY name:bar visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:bar type:kotlin.Int visibility:private [final]
EXPRESSION_BODY
CONST Int type=kotlin.Int value=42
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-bar> visibility:public modality:FINAL <> ($this:<root>.A) returnType:kotlin.Int
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-bar> visibility:public modality:FINAL <> ($this:<root>.A<T of <root>.A>) returnType:kotlin.Int
correspondingProperty: PROPERTY name:bar visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.A
$this: VALUE_PARAMETER name:<this> type:<root>.A<T of <root>.A>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-bar> (): kotlin.Int declared in <root>.A'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:bar type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.A declared in <root>.A.<get-bar>' type=<root>.A origin=null
receiver: GET_VAR '<this>: <root>.A<T of <root>.A> declared in <root>.A.<get-bar>' type=<root>.A<T of <root>.A> 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