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
+23 -23
View File
@@ -1,6 +1,6 @@
FILE /enum.kt
CLASS ENUM_CLASS TestEnum1
$new: VALUE_PARAMETER <receiver: TestEnum1>
$new: VALUE_PARAMETER this@TestEnum1: TestEnum1
CONSTRUCTOR private constructor TestEnum1()
BLOCK_BODY
ENUM_CONSTRUCTOR_CALL 'constructor Enum(String, Int)'
@@ -25,7 +25,7 @@ FILE /enum.kt
FUN ENUM_CLASS_SPECIAL_MEMBER public final fun valueOf(value: kotlin.String): TestEnum1
SYNTHETIC_BODY kind=ENUM_VALUEOF
CLASS ENUM_CLASS TestEnum2
$new: VALUE_PARAMETER <receiver: TestEnum2>
$new: VALUE_PARAMETER this@TestEnum2: TestEnum2
CONSTRUCTOR private constructor TestEnum2(x: kotlin.Int)
VALUE_PARAMETER value-parameter x: kotlin.Int
BLOCK_BODY
@@ -36,11 +36,11 @@ FILE /enum.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: TestEnum2>
$this: VALUE_PARAMETER this@TestEnum2: TestEnum2
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: GET_VAR '<receiver: TestEnum2>' type=TestEnum2 origin=null
receiver: GET_VAR 'this@TestEnum2: TestEnum2' type=TestEnum2 origin=null
ENUM_ENTRY enum entry TEST1
init: ENUM_CONSTRUCTOR_CALL 'constructor TestEnum2(Int)'
x: CONST Int type=kotlin.Int value='1'
@@ -66,7 +66,7 @@ FILE /enum.kt
FUN ENUM_CLASS_SPECIAL_MEMBER public final fun valueOf(value: kotlin.String): TestEnum2
SYNTHETIC_BODY kind=ENUM_VALUEOF
CLASS ENUM_CLASS TestEnum3
$new: VALUE_PARAMETER <receiver: TestEnum3>
$new: VALUE_PARAMETER this@TestEnum3: TestEnum3
CONSTRUCTOR private constructor TestEnum3()
BLOCK_BODY
ENUM_CONSTRUCTOR_CALL 'constructor Enum(String, Int)'
@@ -74,13 +74,13 @@ FILE /enum.kt
ENUM_ENTRY enum entry TEST
init: ENUM_CONSTRUCTOR_CALL 'constructor TEST()'
class: CLASS ENUM_ENTRY TEST
$new: VALUE_PARAMETER <receiver: TEST>
$new: VALUE_PARAMETER this@TEST: TEST
CONSTRUCTOR private constructor TEST()
BLOCK_BODY
ENUM_CONSTRUCTOR_CALL 'constructor TestEnum3()'
INSTANCE_INITIALIZER_CALL classDescriptor='TEST'
FUN public open override fun foo(): kotlin.Unit
$this: VALUE_PARAMETER <receiver: TEST>
$this: VALUE_PARAMETER this@TEST: TEST
BLOCK_BODY
CALL 'println(Any?): Unit' type=kotlin.Unit origin=null
message: CONST String type=kotlin.String value='Hello, world!'
@@ -96,7 +96,7 @@ FILE /enum.kt
FUN FAKE_OVERRIDE public final override fun <get-ordinal>(): kotlin.Int
FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String
FUN public abstract fun foo(): kotlin.Unit
$this: VALUE_PARAMETER <receiver: TestEnum3>
$this: VALUE_PARAMETER this@TestEnum3: TestEnum3
FUN FAKE_OVERRIDE protected final override fun clone(): kotlin.Any
FUN FAKE_OVERRIDE protected/*protected and package*/ final override fun finalize(): kotlin.Unit
FUN FAKE_OVERRIDE public final override fun getDeclaringClass(): java.lang.Class<TestEnum3!>!
@@ -113,7 +113,7 @@ FILE /enum.kt
FUN ENUM_CLASS_SPECIAL_MEMBER public final fun valueOf(value: kotlin.String): TestEnum3
SYNTHETIC_BODY kind=ENUM_VALUEOF
CLASS ENUM_CLASS TestEnum4
$new: VALUE_PARAMETER <receiver: TestEnum4>
$new: VALUE_PARAMETER this@TestEnum4: TestEnum4
CONSTRUCTOR private constructor TestEnum4(x: kotlin.Int)
VALUE_PARAMETER value-parameter x: kotlin.Int
BLOCK_BODY
@@ -124,22 +124,22 @@ FILE /enum.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: TestEnum4>
$this: VALUE_PARAMETER this@TestEnum4: TestEnum4
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: GET_VAR '<receiver: TestEnum4>' type=TestEnum4 origin=null
receiver: GET_VAR 'this@TestEnum4: TestEnum4' type=TestEnum4 origin=null
ENUM_ENTRY enum entry TEST1
init: ENUM_CONSTRUCTOR_CALL 'constructor TEST1()'
class: CLASS ENUM_ENTRY TEST1
$new: VALUE_PARAMETER <receiver: TEST1>
$new: VALUE_PARAMETER this@TEST1: TEST1
CONSTRUCTOR private constructor TEST1()
BLOCK_BODY
ENUM_CONSTRUCTOR_CALL 'constructor TestEnum4(Int)'
x: CONST Int type=kotlin.Int value='1'
INSTANCE_INITIALIZER_CALL classDescriptor='TEST1'
FUN public open override fun foo(): kotlin.Unit
$this: VALUE_PARAMETER <receiver: TEST1>
$this: VALUE_PARAMETER this@TEST1: TEST1
BLOCK_BODY
CALL 'println(Any?): Unit' type=kotlin.Unit origin=null
message: GET_ENUM 'TEST1' type=TestEnum4
@@ -159,7 +159,7 @@ FILE /enum.kt
ENUM_ENTRY enum entry TEST2
init: ENUM_CONSTRUCTOR_CALL 'constructor TEST2()'
class: CLASS ENUM_ENTRY TEST2
$new: VALUE_PARAMETER <receiver: TEST2>
$new: VALUE_PARAMETER this@TEST2: TEST2
CONSTRUCTOR private constructor TEST2()
BLOCK_BODY
ENUM_CONSTRUCTOR_CALL 'constructor TestEnum4(Int)'
@@ -168,19 +168,19 @@ FILE /enum.kt
PROPERTY public final val z: kotlin.Int
FIELD PROPERTY_BACKING_FIELD public final val z: kotlin.Int
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-z>(): kotlin.Int
$this: VALUE_PARAMETER <receiver: TEST2>
$this: VALUE_PARAMETER this@TEST2: TEST2
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-z>(): Int'
GET_FIELD 'z: Int' type=kotlin.Int origin=null
receiver: GET_VAR '<receiver: TEST2>' type=TestEnum4.TEST2 origin=null
receiver: GET_VAR 'this@TEST2: TEST2' type=TestEnum4.TEST2 origin=null
ANONYMOUS_INITIALIZER TEST2
BLOCK_BODY
SET_FIELD 'z: Int' type=kotlin.Unit origin=null
receiver: GET_VAR '<receiver: TEST2>' type=TestEnum4.TEST2 origin=null
receiver: GET_VAR 'this@TEST2: TEST2' type=TestEnum4.TEST2 origin=null
value: CALL '<get-x>(): Int' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<receiver: TEST2>' type=TestEnum4.TEST2 origin=null
$this: GET_VAR 'this@TEST2: TEST2' type=TestEnum4.TEST2 origin=null
FUN public open override fun foo(): kotlin.Unit
$this: VALUE_PARAMETER <receiver: TEST2>
$this: VALUE_PARAMETER this@TEST2: TEST2
BLOCK_BODY
CALL 'println(Any?): Unit' type=kotlin.Unit origin=null
message: GET_ENUM 'TEST2' type=TestEnum4
@@ -198,7 +198,7 @@ FILE /enum.kt
FUN FAKE_OVERRIDE public final override fun <get-x>(): kotlin.Int
FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String
FUN public abstract fun foo(): kotlin.Unit
$this: VALUE_PARAMETER <receiver: TestEnum4>
$this: VALUE_PARAMETER this@TestEnum4: TestEnum4
FUN FAKE_OVERRIDE protected final override fun clone(): kotlin.Any
FUN FAKE_OVERRIDE protected/*protected and package*/ final override fun finalize(): kotlin.Unit
FUN FAKE_OVERRIDE public final override fun getDeclaringClass(): java.lang.Class<TestEnum4!>!
@@ -215,7 +215,7 @@ FILE /enum.kt
FUN ENUM_CLASS_SPECIAL_MEMBER public final fun valueOf(value: kotlin.String): TestEnum4
SYNTHETIC_BODY kind=ENUM_VALUEOF
CLASS ENUM_CLASS TestEnum5
$new: VALUE_PARAMETER <receiver: TestEnum5>
$new: VALUE_PARAMETER this@TestEnum5: TestEnum5
CONSTRUCTOR private constructor TestEnum5(x: kotlin.Int = ...)
VALUE_PARAMETER value-parameter x: kotlin.Int = ...
EXPRESSION_BODY
@@ -228,11 +228,11 @@ FILE /enum.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: TestEnum5>
$this: VALUE_PARAMETER this@TestEnum5: TestEnum5
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: GET_VAR '<receiver: TestEnum5>' type=TestEnum5 origin=null
receiver: GET_VAR 'this@TestEnum5: TestEnum5' type=TestEnum5 origin=null
ENUM_ENTRY enum entry TEST1
init: ENUM_CONSTRUCTOR_CALL 'constructor TestEnum5(Int = ...)'
ENUM_ENTRY enum entry TEST2