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
+22 -22
View File
@@ -1,6 +1,6 @@
FILE /destructuringInLambda.kt
CLASS CLASS A
$new: VALUE_PARAMETER <receiver: A>
$new: VALUE_PARAMETER this@A: A
CONSTRUCTOR public constructor A(x: kotlin.Int, y: kotlin.Int)
VALUE_PARAMETER value-parameter x: kotlin.Int
VALUE_PARAMETER value-parameter y: kotlin.Int
@@ -12,71 +12,71 @@ FILE /destructuringInLambda.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: A>
$this: VALUE_PARAMETER this@A: A
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_FIELD 'x: Int' type=kotlin.Int origin=null
receiver: GET_VAR '<receiver: A>' type=A origin=null
receiver: GET_VAR 'this@A: A' type=A origin=null
PROPERTY public final val y: kotlin.Int
FIELD PROPERTY_BACKING_FIELD public final val y: kotlin.Int
EXPRESSION_BODY
GET_VAR 'value-parameter y: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-y>(): kotlin.Int
$this: VALUE_PARAMETER <receiver: A>
$this: VALUE_PARAMETER this@A: A
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-y>(): Int'
GET_FIELD 'y: Int' type=kotlin.Int origin=null
receiver: GET_VAR '<receiver: A>' type=A origin=null
receiver: GET_VAR 'this@A: A' type=A origin=null
FUN GENERATED_DATA_CLASS_MEMBER public final operator fun component1(): kotlin.Int
$this: VALUE_PARAMETER <receiver: A>
$this: VALUE_PARAMETER this@A: A
BLOCK_BODY
RETURN type=kotlin.Nothing from='component1(): Int'
CALL '<get-x>(): Int' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<receiver: A>' type=A origin=null
$this: GET_VAR 'this@A: A' type=A origin=null
FUN GENERATED_DATA_CLASS_MEMBER public final operator fun component2(): kotlin.Int
$this: VALUE_PARAMETER <receiver: A>
$this: VALUE_PARAMETER this@A: A
BLOCK_BODY
RETURN type=kotlin.Nothing from='component2(): Int'
CALL '<get-y>(): Int' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<receiver: A>' type=A origin=null
$this: GET_VAR 'this@A: A' type=A origin=null
FUN GENERATED_DATA_CLASS_MEMBER public final fun copy(x: kotlin.Int = ..., y: kotlin.Int = ...): A
$this: VALUE_PARAMETER <receiver: A>
$this: VALUE_PARAMETER this@A: A
VALUE_PARAMETER value-parameter x: kotlin.Int = ...
EXPRESSION_BODY
CALL '<get-x>(): Int' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<receiver: A>' type=A origin=null
$this: GET_VAR 'this@A: A' type=A origin=null
VALUE_PARAMETER value-parameter y: kotlin.Int = ...
EXPRESSION_BODY
CALL '<get-y>(): Int' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<receiver: A>' type=A origin=null
$this: GET_VAR 'this@A: A' type=A origin=null
BLOCK_BODY
RETURN type=kotlin.Nothing from='copy(Int = ..., Int = ...): A'
CALL 'constructor A(Int, Int)' type=A origin=null
x: GET_VAR 'value-parameter x: Int = ...' type=kotlin.Int origin=null
y: GET_VAR 'value-parameter y: Int = ...' type=kotlin.Int origin=null
FUN GENERATED_DATA_CLASS_MEMBER public open override fun toString(): kotlin.String
$this: VALUE_PARAMETER <receiver: A>
$this: VALUE_PARAMETER this@A: A
BLOCK_BODY
RETURN type=kotlin.Nothing from='toString(): String'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value='A('
CONST String type=kotlin.String value='x='
CALL '<get-x>(): Int' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<receiver: A>' type=A origin=null
$this: GET_VAR 'this@A: A' type=A origin=null
CONST String type=kotlin.String value=', '
CONST String type=kotlin.String value='y='
CALL '<get-y>(): Int' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<receiver: A>' type=A origin=null
$this: GET_VAR 'this@A: A' type=A origin=null
CONST String type=kotlin.String value=')'
FUN GENERATED_DATA_CLASS_MEMBER public open override fun hashCode(): kotlin.Int
$this: VALUE_PARAMETER <receiver: A>
$this: VALUE_PARAMETER this@A: A
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: A>' type=A origin=null
$this: GET_VAR 'this@A: A' type=A 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
@@ -84,17 +84,17 @@ FILE /destructuringInLambda.kt
other: CONST Int type=kotlin.Int value='31'
other: CALL 'hashCode(): Int' type=kotlin.Int origin=null
$this: CALL '<get-y>(): Int' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<receiver: A>' type=A origin=null
$this: GET_VAR 'this@A: A' type=A 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: A>
$this: VALUE_PARAMETER this@A: A
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: A>' type=A origin=null
arg0: GET_VAR 'this@A: A' type=A 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'
@@ -112,7 +112,7 @@ FILE /destructuringInLambda.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: A>' type=A origin=null
$this: GET_VAR 'this@A: A' type=A origin=null
arg1: CALL '<get-x>(): Int' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR 'tmp0_other_with_cast: A' type=A origin=null
then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean'
@@ -122,7 +122,7 @@ FILE /destructuringInLambda.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>(): Int' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<receiver: A>' type=A origin=null
$this: GET_VAR 'this@A: A' type=A origin=null
arg1: CALL '<get-y>(): Int' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR 'tmp0_other_with_cast: A' type=A origin=null
then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean'
+2 -2
View File
@@ -8,9 +8,9 @@ FILE /extensionLambda.kt
$receiver: CONST String type=kotlin.String value='42'
block: BLOCK type=kotlin.String.() -> kotlin.Int origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun kotlin.String.<anonymous>(): kotlin.Int
$receiver: VALUE_PARAMETER <receiver: <anonymous>() on String: Int>
$receiver: VALUE_PARAMETER this@<anonymous>: String
BLOCK_BODY
RETURN type=kotlin.Nothing from='<anonymous>() on String: Int'
CALL '<get-length>(): Int' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<receiver: <anonymous>() on String: Int>' type=kotlin.String origin=null
$this: GET_VAR 'this@<anonymous>: String' type=kotlin.String origin=null
FUNCTION_REFERENCE '<anonymous>() on String: Int' type=kotlin.String.() -> kotlin.Int origin=LAMBDA
@@ -1,6 +1,6 @@
FILE /multipleImplicitReceivers.kt
CLASS OBJECT A
$new: VALUE_PARAMETER <receiver: A>
$new: VALUE_PARAMETER this@A: A
CONSTRUCTOR private constructor A()
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
@@ -9,7 +9,7 @@ FILE /multipleImplicitReceivers.kt
FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int
FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String
CLASS OBJECT B
$new: VALUE_PARAMETER <receiver: B>
$new: VALUE_PARAMETER this@B: B
CONSTRUCTOR private constructor B()
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
@@ -20,8 +20,8 @@ FILE /multipleImplicitReceivers.kt
CLASS INTERFACE IFoo
PROPERTY public open val A.foo: B
FUN public open fun A.<get-foo>(): B
$this: VALUE_PARAMETER <receiver: IFoo>
$receiver: VALUE_PARAMETER <receiver: foo: B on A>
$this: VALUE_PARAMETER this@IFoo: IFoo
$receiver: VALUE_PARAMETER this@foo: A
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-foo>() on A: B'
GET_OBJECT 'B' type=B
@@ -30,8 +30,8 @@ FILE /multipleImplicitReceivers.kt
FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String
CLASS INTERFACE IInvoke
FUN public open operator fun B.invoke(): kotlin.Int
$this: VALUE_PARAMETER <receiver: IInvoke>
$receiver: VALUE_PARAMETER <receiver: invoke() on B: Int>
$this: VALUE_PARAMETER this@IInvoke: IInvoke
$receiver: VALUE_PARAMETER this@invoke: B
BLOCK_BODY
RETURN type=kotlin.Nothing from='invoke() on B: Int'
CONST Int type=kotlin.Int value='42'
@@ -49,7 +49,7 @@ FILE /multipleImplicitReceivers.kt
receiver: GET_OBJECT 'A' type=A
block: BLOCK type=A.() -> kotlin.Int origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun A.<anonymous>(): kotlin.Int
$receiver: VALUE_PARAMETER <receiver: <anonymous>() on A: Int>
$receiver: VALUE_PARAMETER this@<anonymous>: A
BLOCK_BODY
RETURN type=kotlin.Nothing from='<anonymous>() on A: Int'
CALL 'with(IFoo, IFoo.() -> Int): Int' type=kotlin.Int origin=null
@@ -58,7 +58,7 @@ FILE /multipleImplicitReceivers.kt
receiver: GET_VAR 'value-parameter fooImpl: IFoo' type=IFoo origin=null
block: BLOCK type=IFoo.() -> kotlin.Int origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun IFoo.<anonymous>(): kotlin.Int
$receiver: VALUE_PARAMETER <receiver: <anonymous>() on IFoo: Int>
$receiver: VALUE_PARAMETER this@<anonymous>: IFoo
BLOCK_BODY
RETURN type=kotlin.Nothing from='<anonymous>() on IFoo: Int'
CALL 'with(IInvoke, IInvoke.() -> Int): Int' type=kotlin.Int origin=null
@@ -67,14 +67,14 @@ FILE /multipleImplicitReceivers.kt
receiver: GET_VAR 'value-parameter invokeImpl: IInvoke' type=IInvoke origin=null
block: BLOCK type=IInvoke.() -> kotlin.Int origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun IInvoke.<anonymous>(): kotlin.Int
$receiver: VALUE_PARAMETER <receiver: <anonymous>() on IInvoke: Int>
$receiver: VALUE_PARAMETER this@<anonymous>: IInvoke
BLOCK_BODY
RETURN type=kotlin.Nothing from='<anonymous>() on IInvoke: Int'
CALL 'invoke() on B: Int' type=kotlin.Int origin=INVOKE
$this: GET_VAR '<receiver: <anonymous>() on IInvoke: Int>' type=IInvoke origin=null
$this: GET_VAR 'this@<anonymous>: IInvoke' type=IInvoke origin=null
$receiver: CALL '<get-foo>() on A: B' type=B origin=GET_PROPERTY
$this: GET_VAR '<receiver: <anonymous>() on IFoo: Int>' type=IFoo origin=null
$receiver: GET_VAR '<receiver: <anonymous>() on A: Int>' type=A origin=null
$this: GET_VAR 'this@<anonymous>: IFoo' type=IFoo origin=null
$receiver: GET_VAR 'this@<anonymous>: A' type=A origin=null
FUNCTION_REFERENCE '<anonymous>() on IInvoke: Int' type=IInvoke.() -> kotlin.Int origin=LAMBDA
FUNCTION_REFERENCE '<anonymous>() on IFoo: Int' type=IFoo.() -> kotlin.Int origin=LAMBDA
FUNCTION_REFERENCE '<anonymous>() on A: Int' type=A.() -> kotlin.Int origin=LAMBDA