Render receivers as 'this@owner: type'

Add test for generic inner class with generic outer class.
This commit is contained in:
Dmitry Petrov
2017-04-19 18:19:31 +03:00
parent 1bf6f8fc57
commit a511540aad
99 changed files with 944 additions and 905 deletions
+44 -44
View File
@@ -1,6 +1,6 @@
FILE /dataClasses.kt
CLASS CLASS Test1
$new: VALUE_PARAMETER <receiver: Test1>
$new: VALUE_PARAMETER this@Test1: Test1
CONSTRUCTOR public constructor Test1(x: kotlin.Int, y: kotlin.String, z: kotlin.Any)
VALUE_PARAMETER value-parameter x: kotlin.Int
VALUE_PARAMETER value-parameter y: kotlin.String
@@ -13,63 +13,63 @@ FILE /dataClasses.kt
EXPRESSION_BODY
GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
$this: VALUE_PARAMETER <receiver: Test1>
$this: VALUE_PARAMETER this@Test1: Test1
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: GET_VAR '<receiver: Test1>' type=Test1 origin=null
receiver: GET_VAR 'this@Test1: Test1' type=Test1 origin=null
PROPERTY public final val y: kotlin.String
FIELD PROPERTY_BACKING_FIELD public final val y: kotlin.String
EXPRESSION_BODY
GET_VAR 'value-parameter y: String' type=kotlin.String origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-y>(): kotlin.String
$this: VALUE_PARAMETER <receiver: Test1>
$this: VALUE_PARAMETER this@Test1: Test1
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-y>(): String'
GET_FIELD 'y: String' type=kotlin.String origin=null
receiver: GET_VAR '<receiver: Test1>' type=Test1 origin=null
receiver: GET_VAR 'this@Test1: Test1' type=Test1 origin=null
PROPERTY public final val z: kotlin.Any
FIELD PROPERTY_BACKING_FIELD public final val z: kotlin.Any
EXPRESSION_BODY
GET_VAR 'value-parameter z: Any' type=kotlin.Any origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-z>(): kotlin.Any
$this: VALUE_PARAMETER <receiver: Test1>
$this: VALUE_PARAMETER this@Test1: Test1
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-z>(): Any'
GET_FIELD 'z: Any' type=kotlin.Any origin=null
receiver: GET_VAR '<receiver: Test1>' type=Test1 origin=null
receiver: GET_VAR 'this@Test1: Test1' type=Test1 origin=null
FUN GENERATED_DATA_CLASS_MEMBER public final operator fun component1(): kotlin.Int
$this: VALUE_PARAMETER <receiver: Test1>
$this: VALUE_PARAMETER this@Test1: Test1
BLOCK_BODY
RETURN type=kotlin.Nothing from='component1(): Int'
CALL '<get-x>(): Int' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
$this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null
FUN GENERATED_DATA_CLASS_MEMBER public final operator fun component2(): kotlin.String
$this: VALUE_PARAMETER <receiver: Test1>
$this: VALUE_PARAMETER this@Test1: Test1
BLOCK_BODY
RETURN type=kotlin.Nothing from='component2(): String'
CALL '<get-y>(): String' type=kotlin.String origin=GET_PROPERTY
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
$this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null
FUN GENERATED_DATA_CLASS_MEMBER public final operator fun component3(): kotlin.Any
$this: VALUE_PARAMETER <receiver: Test1>
$this: VALUE_PARAMETER this@Test1: Test1
BLOCK_BODY
RETURN type=kotlin.Nothing from='component3(): Any'
CALL '<get-z>(): Any' type=kotlin.Any origin=GET_PROPERTY
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
$this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null
FUN GENERATED_DATA_CLASS_MEMBER public final fun copy(x: kotlin.Int = ..., y: kotlin.String = ..., z: kotlin.Any = ...): Test1
$this: VALUE_PARAMETER <receiver: Test1>
$this: VALUE_PARAMETER this@Test1: Test1
VALUE_PARAMETER value-parameter x: kotlin.Int = ...
EXPRESSION_BODY
CALL '<get-x>(): Int' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
$this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null
VALUE_PARAMETER value-parameter y: kotlin.String = ...
EXPRESSION_BODY
CALL '<get-y>(): String' type=kotlin.String origin=GET_PROPERTY
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
$this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null
VALUE_PARAMETER value-parameter z: kotlin.Any = ...
EXPRESSION_BODY
CALL '<get-z>(): Any' type=kotlin.Any origin=GET_PROPERTY
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
$this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null
BLOCK_BODY
RETURN type=kotlin.Nothing from='copy(Int = ..., String = ..., Any = ...): Test1'
CALL 'constructor Test1(Int, String, Any)' type=Test1 origin=null
@@ -77,32 +77,32 @@ FILE /dataClasses.kt
y: GET_VAR 'value-parameter y: String = ...' type=kotlin.String origin=null
z: GET_VAR 'value-parameter z: Any = ...' type=kotlin.Any origin=null
FUN GENERATED_DATA_CLASS_MEMBER public open override fun toString(): kotlin.String
$this: VALUE_PARAMETER <receiver: Test1>
$this: VALUE_PARAMETER this@Test1: Test1
BLOCK_BODY
RETURN type=kotlin.Nothing from='toString(): String'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value='Test1('
CONST String type=kotlin.String value='x='
CALL '<get-x>(): Int' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
$this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null
CONST String type=kotlin.String value=', '
CONST String type=kotlin.String value='y='
CALL '<get-y>(): String' type=kotlin.String origin=GET_PROPERTY
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
$this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null
CONST String type=kotlin.String value=', '
CONST String type=kotlin.String value='z='
CALL '<get-z>(): Any' type=kotlin.Any origin=GET_PROPERTY
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
$this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null
CONST String type=kotlin.String value=')'
FUN GENERATED_DATA_CLASS_MEMBER public open override fun hashCode(): kotlin.Int
$this: VALUE_PARAMETER <receiver: Test1>
$this: VALUE_PARAMETER this@Test1: Test1
BLOCK_BODY
VAR IR_TEMPORARY_VARIABLE var tmp0_result: kotlin.Int
CONST Int type=kotlin.Int value='0'
SET_VAR 'tmp0_result: Int' type=kotlin.Unit origin=EQ
CALL 'hashCode(): Int' type=kotlin.Int origin=null
$this: CALL '<get-x>(): Int' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
$this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null
SET_VAR 'tmp0_result: Int' type=kotlin.Unit origin=EQ
CALL 'plus(Int): Int' type=kotlin.Int origin=null
$this: CALL 'times(Int): Int' type=kotlin.Int origin=null
@@ -110,7 +110,7 @@ FILE /dataClasses.kt
other: CONST Int type=kotlin.Int value='31'
other: CALL 'hashCode(): Int' type=kotlin.Int origin=null
$this: CALL '<get-y>(): String' type=kotlin.String origin=GET_PROPERTY
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
$this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null
SET_VAR 'tmp0_result: Int' type=kotlin.Unit origin=EQ
CALL 'plus(Int): Int' type=kotlin.Int origin=null
$this: CALL 'times(Int): Int' type=kotlin.Int origin=null
@@ -118,17 +118,17 @@ FILE /dataClasses.kt
other: CONST Int type=kotlin.Int value='31'
other: CALL 'hashCode(): Int' type=kotlin.Int origin=null
$this: CALL '<get-z>(): Any' type=kotlin.Any origin=GET_PROPERTY
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
$this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null
RETURN type=kotlin.Nothing from='hashCode(): Int'
GET_VAR 'tmp0_result: Int' type=kotlin.Int origin=null
FUN GENERATED_DATA_CLASS_MEMBER public open override fun equals(other: kotlin.Any?): kotlin.Boolean
$this: VALUE_PARAMETER <receiver: Test1>
$this: VALUE_PARAMETER this@Test1: Test1
VALUE_PARAMETER value-parameter other: kotlin.Any?
BLOCK_BODY
WHEN type=kotlin.Unit origin=null
BRANCH
if: CALL 'EQEQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQEQ
arg0: GET_VAR '<receiver: Test1>' type=Test1 origin=null
arg0: GET_VAR 'this@Test1: Test1' type=Test1 origin=null
arg1: GET_VAR 'value-parameter other: Any?' type=kotlin.Any? origin=null
then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean'
CONST Boolean type=kotlin.Boolean value='true'
@@ -146,7 +146,7 @@ FILE /dataClasses.kt
if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ
arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EXCLEQ
arg0: CALL '<get-x>(): Int' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
$this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null
arg1: CALL '<get-x>(): Int' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR 'tmp0_other_with_cast: Test1' type=Test1 origin=null
then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean'
@@ -156,7 +156,7 @@ FILE /dataClasses.kt
if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ
arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EXCLEQ
arg0: CALL '<get-y>(): String' type=kotlin.String origin=GET_PROPERTY
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
$this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null
arg1: CALL '<get-y>(): String' type=kotlin.String origin=GET_PROPERTY
$this: GET_VAR 'tmp0_other_with_cast: Test1' type=Test1 origin=null
then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean'
@@ -166,7 +166,7 @@ FILE /dataClasses.kt
if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ
arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EXCLEQ
arg0: CALL '<get-z>(): Any' type=kotlin.Any origin=GET_PROPERTY
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
$this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null
arg1: CALL '<get-z>(): Any' type=kotlin.Any origin=GET_PROPERTY
$this: GET_VAR 'tmp0_other_with_cast: Test1' type=Test1 origin=null
then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean'
@@ -174,7 +174,7 @@ FILE /dataClasses.kt
RETURN type=kotlin.Nothing from='equals(Any?): Boolean'
CONST Boolean type=kotlin.Boolean value='true'
CLASS CLASS Test2
$new: VALUE_PARAMETER <receiver: Test2>
$new: VALUE_PARAMETER this@Test2: Test2
CONSTRUCTOR public constructor Test2(x: kotlin.Any?)
VALUE_PARAMETER value-parameter x: kotlin.Any?
BLOCK_BODY
@@ -185,39 +185,39 @@ FILE /dataClasses.kt
EXPRESSION_BODY
GET_VAR 'value-parameter x: Any?' type=kotlin.Any? origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Any?
$this: VALUE_PARAMETER <receiver: Test2>
$this: VALUE_PARAMETER this@Test2: Test2
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Any?'
GET_FIELD 'x: Any?' type=kotlin.Any? origin=null
receiver: GET_VAR '<receiver: Test2>' type=Test2 origin=null
receiver: GET_VAR 'this@Test2: Test2' type=Test2 origin=null
FUN GENERATED_DATA_CLASS_MEMBER public final operator fun component1(): kotlin.Any?
$this: VALUE_PARAMETER <receiver: Test2>
$this: VALUE_PARAMETER this@Test2: Test2
BLOCK_BODY
RETURN type=kotlin.Nothing from='component1(): Any?'
CALL '<get-x>(): Any?' type=kotlin.Any? origin=GET_PROPERTY
$this: GET_VAR '<receiver: Test2>' type=Test2 origin=null
$this: GET_VAR 'this@Test2: Test2' type=Test2 origin=null
FUN GENERATED_DATA_CLASS_MEMBER public final fun copy(x: kotlin.Any? = ...): Test2
$this: VALUE_PARAMETER <receiver: Test2>
$this: VALUE_PARAMETER this@Test2: Test2
VALUE_PARAMETER value-parameter x: kotlin.Any? = ...
EXPRESSION_BODY
CALL '<get-x>(): Any?' type=kotlin.Any? origin=GET_PROPERTY
$this: GET_VAR '<receiver: Test2>' type=Test2 origin=null
$this: GET_VAR 'this@Test2: Test2' type=Test2 origin=null
BLOCK_BODY
RETURN type=kotlin.Nothing from='copy(Any? = ...): Test2'
CALL 'constructor Test2(Any?)' type=Test2 origin=null
x: GET_VAR 'value-parameter x: Any? = ...' type=kotlin.Any? origin=null
FUN GENERATED_DATA_CLASS_MEMBER public open override fun toString(): kotlin.String
$this: VALUE_PARAMETER <receiver: Test2>
$this: VALUE_PARAMETER this@Test2: Test2
BLOCK_BODY
RETURN type=kotlin.Nothing from='toString(): String'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value='Test2('
CONST String type=kotlin.String value='x='
CALL '<get-x>(): Any?' type=kotlin.Any? origin=GET_PROPERTY
$this: GET_VAR '<receiver: Test2>' type=Test2 origin=null
$this: GET_VAR 'this@Test2: Test2' type=Test2 origin=null
CONST String type=kotlin.String value=')'
FUN GENERATED_DATA_CLASS_MEMBER public open override fun hashCode(): kotlin.Int
$this: VALUE_PARAMETER <receiver: Test2>
$this: VALUE_PARAMETER this@Test2: Test2
BLOCK_BODY
VAR IR_TEMPORARY_VARIABLE var tmp0_result: kotlin.Int
CONST Int type=kotlin.Int value='0'
@@ -225,7 +225,7 @@ FILE /dataClasses.kt
BLOCK type=kotlin.Int origin=null
VAR IR_TEMPORARY_VARIABLE val tmp1: kotlin.Any?
CALL '<get-x>(): Any?' type=kotlin.Any? origin=GET_PROPERTY
$this: GET_VAR '<receiver: Test2>' type=Test2 origin=null
$this: GET_VAR 'this@Test2: Test2' type=Test2 origin=null
WHEN type=kotlin.Int origin=null
BRANCH
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
@@ -239,13 +239,13 @@ FILE /dataClasses.kt
RETURN type=kotlin.Nothing from='hashCode(): Int'
GET_VAR 'tmp0_result: Int' type=kotlin.Int origin=null
FUN GENERATED_DATA_CLASS_MEMBER public open override fun equals(other: kotlin.Any?): kotlin.Boolean
$this: VALUE_PARAMETER <receiver: Test2>
$this: VALUE_PARAMETER this@Test2: Test2
VALUE_PARAMETER value-parameter other: kotlin.Any?
BLOCK_BODY
WHEN type=kotlin.Unit origin=null
BRANCH
if: CALL 'EQEQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQEQ
arg0: GET_VAR '<receiver: Test2>' type=Test2 origin=null
arg0: GET_VAR 'this@Test2: Test2' type=Test2 origin=null
arg1: GET_VAR 'value-parameter other: Any?' type=kotlin.Any? origin=null
then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean'
CONST Boolean type=kotlin.Boolean value='true'
@@ -263,7 +263,7 @@ FILE /dataClasses.kt
if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ
arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EXCLEQ
arg0: CALL '<get-x>(): Any?' type=kotlin.Any? origin=GET_PROPERTY
$this: GET_VAR '<receiver: Test2>' type=Test2 origin=null
$this: GET_VAR 'this@Test2: Test2' type=Test2 origin=null
arg1: CALL '<get-x>(): Any?' type=kotlin.Any? origin=GET_PROPERTY
$this: GET_VAR 'tmp0_other_with_cast: Test2' type=Test2 origin=null
then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean'