KT-37448 'this' in delegating constructor call may refer to outer object
This commit is contained in:
Generated
+5
@@ -16850,6 +16850,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
|||||||
runTest("compiler/testData/codegen/box/objects/thisInConstructor.kt");
|
runTest("compiler/testData/codegen/box/objects/thisInConstructor.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("thisRefToObjectInNestedClassConstructorCall.kt")
|
||||||
|
public void testThisRefToObjectInNestedClassConstructorCall() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/objects/thisRefToObjectInNestedClassConstructorCall.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("useAnonymousObjectAsIterator.kt")
|
@TestMetadata("useAnonymousObjectAsIterator.kt")
|
||||||
public void testUseAnonymousObjectAsIterator() throws Exception {
|
public void testUseAnonymousObjectAsIterator() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/objects/useAnonymousObjectAsIterator.kt");
|
runTest("compiler/testData/codegen/box/objects/useAnonymousObjectAsIterator.kt");
|
||||||
|
|||||||
+5
@@ -1247,6 +1247,11 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest {
|
|||||||
runTest("compiler/testData/ir/irText/expressions/thisOfGenericOuterClass.kt");
|
runTest("compiler/testData/ir/irText/expressions/thisOfGenericOuterClass.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("thisRefToObjectInNestedClassConstructorCall.kt")
|
||||||
|
public void testThisRefToObjectInNestedClassConstructorCall() throws Exception {
|
||||||
|
runTest("compiler/testData/ir/irText/expressions/thisRefToObjectInNestedClassConstructorCall.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("thisReferenceBeforeClassDeclared.kt")
|
@TestMetadata("thisReferenceBeforeClassDeclared.kt")
|
||||||
public void testThisReferenceBeforeClassDeclared() throws Exception {
|
public void testThisReferenceBeforeClassDeclared() throws Exception {
|
||||||
runTest("compiler/testData/ir/irText/expressions/thisReferenceBeforeClassDeclared.kt");
|
runTest("compiler/testData/ir/irText/expressions/thisReferenceBeforeClassDeclared.kt");
|
||||||
|
|||||||
+3
-2
@@ -368,10 +368,11 @@ class StatementGenerator(
|
|||||||
override fun visitSafeQualifiedExpression(expression: KtSafeQualifiedExpression, data: Nothing?): IrStatement =
|
override fun visitSafeQualifiedExpression(expression: KtSafeQualifiedExpression, data: Nothing?): IrStatement =
|
||||||
expression.selectorExpression!!.accept(this, data)
|
expression.selectorExpression!!.accept(this, data)
|
||||||
|
|
||||||
private fun isInsideClass(classDescriptor: ClassDescriptor): Boolean {
|
private fun isThisForClassPhysicallyAvailable(classDescriptor: ClassDescriptor): Boolean {
|
||||||
var scopeDescriptor: DeclarationDescriptor? = scopeOwner
|
var scopeDescriptor: DeclarationDescriptor? = scopeOwner
|
||||||
while (scopeDescriptor != null) {
|
while (scopeDescriptor != null) {
|
||||||
if (scopeDescriptor == classDescriptor) return true
|
if (scopeDescriptor == classDescriptor) return true
|
||||||
|
if (scopeDescriptor is ClassDescriptor && !scopeDescriptor.isInner) return false
|
||||||
scopeDescriptor = scopeDescriptor.containingDeclaration
|
scopeDescriptor = scopeDescriptor.containingDeclaration
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
@@ -381,7 +382,7 @@ class StatementGenerator(
|
|||||||
val thisAsReceiverParameter = classDescriptor.thisAsReceiverParameter
|
val thisAsReceiverParameter = classDescriptor.thisAsReceiverParameter
|
||||||
val thisType = kotlinType.toIrType()
|
val thisType = kotlinType.toIrType()
|
||||||
|
|
||||||
return if (DescriptorUtils.isObject(classDescriptor) && !isInsideClass(classDescriptor)) {
|
return if (DescriptorUtils.isObject(classDescriptor) && !isThisForClassPhysicallyAvailable(classDescriptor)) {
|
||||||
IrGetObjectValueImpl(
|
IrGetObjectValueImpl(
|
||||||
startOffset, endOffset,
|
startOffset, endOffset,
|
||||||
thisType,
|
thisType,
|
||||||
|
|||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
// IGNORE_BACKEND_FIR: JVM_IR
|
||||||
|
|
||||||
|
open class Base(val s: String)
|
||||||
|
|
||||||
|
object Host {
|
||||||
|
class Derived : Base(this.foo())
|
||||||
|
|
||||||
|
fun foo() = "OK"
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box() = Host.Derived().s
|
||||||
Vendored
+103
@@ -0,0 +1,103 @@
|
|||||||
|
FILE fqName:<root> fileName:/thisRefToObjectInNestedClassConstructorCall.kt
|
||||||
|
CLASS CLASS name:Base modality:OPEN visibility:public superTypes:[kotlin.Any]
|
||||||
|
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Base
|
||||||
|
CONSTRUCTOR visibility:public <> (x:kotlin.Any) returnType:<root>.Base [primary]
|
||||||
|
VALUE_PARAMETER name:x index:0 type:kotlin.Any
|
||||||
|
BLOCK_BODY
|
||||||
|
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||||
|
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Base modality:OPEN visibility:public superTypes:[kotlin.Any]'
|
||||||
|
PROPERTY name:x visibility:public modality:FINAL [val]
|
||||||
|
FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Any visibility:private [final]
|
||||||
|
EXPRESSION_BODY
|
||||||
|
GET_VAR 'x: kotlin.Any declared in <root>.Base.<init>' type=kotlin.Any origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||||
|
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-x> visibility:public modality:FINAL <> ($this:<root>.Base) returnType:kotlin.Any
|
||||||
|
correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [val]
|
||||||
|
$this: VALUE_PARAMETER name:<this> type:<root>.Base
|
||||||
|
BLOCK_BODY
|
||||||
|
RETURN type=kotlin.Nothing from='public final fun <get-x> (): kotlin.Any declared in <root>.Base'
|
||||||
|
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Any visibility:private [final]' type=kotlin.Any origin=null
|
||||||
|
receiver: GET_VAR '<this>: <root>.Base declared in <root>.Base.<get-x>' type=<root>.Base 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
|
||||||
|
$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
|
||||||
|
CLASS OBJECT name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]
|
||||||
|
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Host
|
||||||
|
CONSTRUCTOR visibility:private <> () returnType:<root>.Host [primary]
|
||||||
|
BLOCK_BODY
|
||||||
|
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||||
|
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]'
|
||||||
|
CLASS CLASS name:Derived1 modality:FINAL visibility:public superTypes:[<root>.Base]
|
||||||
|
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Host.Derived1
|
||||||
|
CONSTRUCTOR visibility:public <> () returnType:<root>.Host.Derived1 [primary]
|
||||||
|
BLOCK_BODY
|
||||||
|
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> (x: kotlin.Any) [primary] declared in <root>.Base'
|
||||||
|
x: GET_VAR '<this>: <root>.Host.Derived1 declared in <root>.Host.Derived1' type=<root>.Host.Derived1 origin=null
|
||||||
|
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Derived1 modality:FINAL visibility:public superTypes:[<root>.Base]'
|
||||||
|
PROPERTY FAKE_OVERRIDE name:x visibility:public modality:FINAL [fake_override,val]
|
||||||
|
FUN FAKE_OVERRIDE name:<get-x> visibility:public modality:FINAL <> ($this:<root>.Host.Derived1) returnType:kotlin.Any [fake_override]
|
||||||
|
correspondingProperty: PROPERTY FAKE_OVERRIDE name:x visibility:public modality:FINAL [fake_override,val]
|
||||||
|
overridden:
|
||||||
|
public final fun <get-x> (): kotlin.Any declared in <root>.Base
|
||||||
|
$this: VALUE_PARAMETER name:<this> type:<root>.Host.Derived1
|
||||||
|
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
|
||||||
|
$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
|
||||||
|
CLASS CLASS name:Derived2 modality:FINAL visibility:public superTypes:[<root>.Base]
|
||||||
|
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Host.Derived2
|
||||||
|
CONSTRUCTOR visibility:public <> () returnType:<root>.Host.Derived2 [primary]
|
||||||
|
BLOCK_BODY
|
||||||
|
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> (x: kotlin.Any) [primary] declared in <root>.Base'
|
||||||
|
x: GET_OBJECT 'CLASS OBJECT name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.Host
|
||||||
|
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Derived2 modality:FINAL visibility:public superTypes:[<root>.Base]'
|
||||||
|
PROPERTY FAKE_OVERRIDE name:x visibility:public modality:FINAL [fake_override,val]
|
||||||
|
FUN FAKE_OVERRIDE name:<get-x> visibility:public modality:FINAL <> ($this:<root>.Host.Derived2) returnType:kotlin.Any [fake_override]
|
||||||
|
correspondingProperty: PROPERTY FAKE_OVERRIDE name:x visibility:public modality:FINAL [fake_override,val]
|
||||||
|
overridden:
|
||||||
|
public final fun <get-x> (): kotlin.Any declared in <root>.Base
|
||||||
|
$this: VALUE_PARAMETER name:<this> type:<root>.Host.Derived2
|
||||||
|
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
|
||||||
|
$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
|
||||||
|
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
|
||||||
|
$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
|
||||||
+6
@@ -0,0 +1,6 @@
|
|||||||
|
open class Base(val x: Any)
|
||||||
|
|
||||||
|
object Host {
|
||||||
|
class Derived1 : Base(this)
|
||||||
|
class Derived2 : Base(Host)
|
||||||
|
}
|
||||||
+103
@@ -0,0 +1,103 @@
|
|||||||
|
FILE fqName:<root> fileName:/thisRefToObjectInNestedClassConstructorCall.kt
|
||||||
|
CLASS CLASS name:Base modality:OPEN visibility:public superTypes:[kotlin.Any]
|
||||||
|
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Base
|
||||||
|
CONSTRUCTOR visibility:public <> (x:kotlin.Any) returnType:<root>.Base [primary]
|
||||||
|
VALUE_PARAMETER name:x index:0 type:kotlin.Any
|
||||||
|
BLOCK_BODY
|
||||||
|
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||||
|
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Base modality:OPEN visibility:public superTypes:[kotlin.Any]'
|
||||||
|
PROPERTY name:x visibility:public modality:FINAL [val]
|
||||||
|
FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Any visibility:private [final]
|
||||||
|
EXPRESSION_BODY
|
||||||
|
GET_VAR 'x: kotlin.Any declared in <root>.Base.<init>' type=kotlin.Any origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||||
|
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-x> visibility:public modality:FINAL <> ($this:<root>.Base) returnType:kotlin.Any
|
||||||
|
correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [val]
|
||||||
|
$this: VALUE_PARAMETER name:<this> type:<root>.Base
|
||||||
|
BLOCK_BODY
|
||||||
|
RETURN type=kotlin.Nothing from='public final fun <get-x> (): kotlin.Any declared in <root>.Base'
|
||||||
|
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Any visibility:private [final]' type=kotlin.Any origin=null
|
||||||
|
receiver: GET_VAR '<this>: <root>.Base declared in <root>.Base.<get-x>' type=<root>.Base 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
|
||||||
|
$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
|
||||||
|
CLASS OBJECT name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]
|
||||||
|
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Host
|
||||||
|
CONSTRUCTOR visibility:private <> () returnType:<root>.Host [primary]
|
||||||
|
BLOCK_BODY
|
||||||
|
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||||
|
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]'
|
||||||
|
CLASS CLASS name:Derived1 modality:FINAL visibility:public superTypes:[<root>.Base]
|
||||||
|
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Host.Derived1
|
||||||
|
CONSTRUCTOR visibility:public <> () returnType:<root>.Host.Derived1 [primary]
|
||||||
|
BLOCK_BODY
|
||||||
|
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> (x: kotlin.Any) [primary] declared in <root>.Base'
|
||||||
|
x: GET_OBJECT 'CLASS OBJECT name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.Host
|
||||||
|
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Derived1 modality:FINAL visibility:public superTypes:[<root>.Base]'
|
||||||
|
PROPERTY FAKE_OVERRIDE name:x visibility:public modality:FINAL [fake_override,val]
|
||||||
|
FUN FAKE_OVERRIDE name:<get-x> visibility:public modality:FINAL <> ($this:<root>.Base) returnType:kotlin.Any [fake_override]
|
||||||
|
correspondingProperty: PROPERTY FAKE_OVERRIDE name:x visibility:public modality:FINAL [fake_override,val]
|
||||||
|
overridden:
|
||||||
|
public final fun <get-x> (): kotlin.Any declared in <root>.Base
|
||||||
|
$this: VALUE_PARAMETER name:<this> type:<root>.Base
|
||||||
|
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 [fake_override,operator] declared in <root>.Base
|
||||||
|
$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 [fake_override] declared in <root>.Base
|
||||||
|
$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 [fake_override] declared in <root>.Base
|
||||||
|
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||||
|
CLASS CLASS name:Derived2 modality:FINAL visibility:public superTypes:[<root>.Base]
|
||||||
|
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Host.Derived2
|
||||||
|
CONSTRUCTOR visibility:public <> () returnType:<root>.Host.Derived2 [primary]
|
||||||
|
BLOCK_BODY
|
||||||
|
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> (x: kotlin.Any) [primary] declared in <root>.Base'
|
||||||
|
x: GET_OBJECT 'CLASS OBJECT name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.Host
|
||||||
|
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Derived2 modality:FINAL visibility:public superTypes:[<root>.Base]'
|
||||||
|
PROPERTY FAKE_OVERRIDE name:x visibility:public modality:FINAL [fake_override,val]
|
||||||
|
FUN FAKE_OVERRIDE name:<get-x> visibility:public modality:FINAL <> ($this:<root>.Base) returnType:kotlin.Any [fake_override]
|
||||||
|
correspondingProperty: PROPERTY FAKE_OVERRIDE name:x visibility:public modality:FINAL [fake_override,val]
|
||||||
|
overridden:
|
||||||
|
public final fun <get-x> (): kotlin.Any declared in <root>.Base
|
||||||
|
$this: VALUE_PARAMETER name:<this> type:<root>.Base
|
||||||
|
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 [fake_override,operator] declared in <root>.Base
|
||||||
|
$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 [fake_override] declared in <root>.Base
|
||||||
|
$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 [fake_override] declared in <root>.Base
|
||||||
|
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||||
|
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
|
||||||
|
$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
|
||||||
+5
@@ -17995,6 +17995,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
runTest("compiler/testData/codegen/box/objects/thisInConstructor.kt");
|
runTest("compiler/testData/codegen/box/objects/thisInConstructor.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("thisRefToObjectInNestedClassConstructorCall.kt")
|
||||||
|
public void testThisRefToObjectInNestedClassConstructorCall() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/objects/thisRefToObjectInNestedClassConstructorCall.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("useAnonymousObjectAsIterator.kt")
|
@TestMetadata("useAnonymousObjectAsIterator.kt")
|
||||||
public void testUseAnonymousObjectAsIterator() throws Exception {
|
public void testUseAnonymousObjectAsIterator() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/objects/useAnonymousObjectAsIterator.kt");
|
runTest("compiler/testData/codegen/box/objects/useAnonymousObjectAsIterator.kt");
|
||||||
|
|||||||
+5
@@ -17995,6 +17995,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
|||||||
runTest("compiler/testData/codegen/box/objects/thisInConstructor.kt");
|
runTest("compiler/testData/codegen/box/objects/thisInConstructor.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("thisRefToObjectInNestedClassConstructorCall.kt")
|
||||||
|
public void testThisRefToObjectInNestedClassConstructorCall() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/objects/thisRefToObjectInNestedClassConstructorCall.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("useAnonymousObjectAsIterator.kt")
|
@TestMetadata("useAnonymousObjectAsIterator.kt")
|
||||||
public void testUseAnonymousObjectAsIterator() throws Exception {
|
public void testUseAnonymousObjectAsIterator() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/objects/useAnonymousObjectAsIterator.kt");
|
runTest("compiler/testData/codegen/box/objects/useAnonymousObjectAsIterator.kt");
|
||||||
|
|||||||
+5
@@ -16850,6 +16850,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
|||||||
runTest("compiler/testData/codegen/box/objects/thisInConstructor.kt");
|
runTest("compiler/testData/codegen/box/objects/thisInConstructor.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("thisRefToObjectInNestedClassConstructorCall.kt")
|
||||||
|
public void testThisRefToObjectInNestedClassConstructorCall() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/objects/thisRefToObjectInNestedClassConstructorCall.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("useAnonymousObjectAsIterator.kt")
|
@TestMetadata("useAnonymousObjectAsIterator.kt")
|
||||||
public void testUseAnonymousObjectAsIterator() throws Exception {
|
public void testUseAnonymousObjectAsIterator() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/objects/useAnonymousObjectAsIterator.kt");
|
runTest("compiler/testData/codegen/box/objects/useAnonymousObjectAsIterator.kt");
|
||||||
|
|||||||
@@ -1246,6 +1246,11 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase {
|
|||||||
runTest("compiler/testData/ir/irText/expressions/thisOfGenericOuterClass.kt");
|
runTest("compiler/testData/ir/irText/expressions/thisOfGenericOuterClass.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("thisRefToObjectInNestedClassConstructorCall.kt")
|
||||||
|
public void testThisRefToObjectInNestedClassConstructorCall() throws Exception {
|
||||||
|
runTest("compiler/testData/ir/irText/expressions/thisRefToObjectInNestedClassConstructorCall.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("thisReferenceBeforeClassDeclared.kt")
|
@TestMetadata("thisReferenceBeforeClassDeclared.kt")
|
||||||
public void testThisReferenceBeforeClassDeclared() throws Exception {
|
public void testThisReferenceBeforeClassDeclared() throws Exception {
|
||||||
runTest("compiler/testData/ir/irText/expressions/thisReferenceBeforeClassDeclared.kt");
|
runTest("compiler/testData/ir/irText/expressions/thisReferenceBeforeClassDeclared.kt");
|
||||||
|
|||||||
Generated
+5
@@ -13750,6 +13750,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
|||||||
runTest("compiler/testData/codegen/box/objects/thisInConstructor.kt");
|
runTest("compiler/testData/codegen/box/objects/thisInConstructor.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("thisRefToObjectInNestedClassConstructorCall.kt")
|
||||||
|
public void testThisRefToObjectInNestedClassConstructorCall() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/objects/thisRefToObjectInNestedClassConstructorCall.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("useAnonymousObjectAsIterator.kt")
|
@TestMetadata("useAnonymousObjectAsIterator.kt")
|
||||||
public void testUseAnonymousObjectAsIterator() throws Exception {
|
public void testUseAnonymousObjectAsIterator() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/objects/useAnonymousObjectAsIterator.kt");
|
runTest("compiler/testData/codegen/box/objects/useAnonymousObjectAsIterator.kt");
|
||||||
|
|||||||
+5
@@ -13815,6 +13815,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
|||||||
runTest("compiler/testData/codegen/box/objects/thisInConstructor.kt");
|
runTest("compiler/testData/codegen/box/objects/thisInConstructor.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("thisRefToObjectInNestedClassConstructorCall.kt")
|
||||||
|
public void testThisRefToObjectInNestedClassConstructorCall() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/objects/thisRefToObjectInNestedClassConstructorCall.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("useAnonymousObjectAsIterator.kt")
|
@TestMetadata("useAnonymousObjectAsIterator.kt")
|
||||||
public void testUseAnonymousObjectAsIterator() throws Exception {
|
public void testUseAnonymousObjectAsIterator() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/objects/useAnonymousObjectAsIterator.kt");
|
runTest("compiler/testData/codegen/box/objects/useAnonymousObjectAsIterator.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user