From 465261e6115324dc108ad2bc36867cced1f7acef Mon Sep 17 00:00:00 2001 From: Mikhail Glukhikh Date: Tue, 26 Jan 2021 17:49:40 +0300 Subject: [PATCH] FIR: don't create intersection override for duplicating symbols --- .../scopes/impl/FirTypeIntersectionScope.kt | 10 ++++- .../bytecodeText/boxingOptimization/kt7224.kt | 2 + .../skipCallToUnderlyingValueOfInlineClass.kt | 1 + .../bytecodeText/jvm8/hashCode/hashCode.kt | 1 + .../classes/enumWithMultipleCtors.fir.txt | 8 ++-- .../expressions/breakContinueInWhen.fir.txt | 2 +- .../ir/irText/expressions/equals.fir.txt | 4 +- .../floatingPointEquals.fir.txt | 40 +++++++++---------- .../ir/irText/expressions/kt28006.fir.txt | 8 ++-- .../ir/irText/expressions/kt30020.fir.txt | 3 -- .../objectReferenceInFieldInitializer.fir.txt | 2 +- .../ir/irText/expressions/safeCalls.fir.txt | 4 +- .../expressions/stringTemplates.fir.txt | 10 ++--- .../DelegationAndInheritanceFromJava.fir.txt | 6 +-- .../inapplicableCollectionSet.fir.txt | 2 +- .../irText/regressions/coercionInLoop.fir.txt | 2 +- ...mpareToCallsOnPlatformTypeReceiver.fir.txt | 6 +-- .../nullChecks/platformTypeReceiver.fir.txt | 4 +- .../testData/memberScopeByFqName/Int.txt | 18 ++++----- .../memberScopeByFqName/MutableList.txt | 18 ++++----- 20 files changed, 80 insertions(+), 71 deletions(-) diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/scopes/impl/FirTypeIntersectionScope.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/scopes/impl/FirTypeIntersectionScope.kt index c8be97684ea..675553f33ce 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/scopes/impl/FirTypeIntersectionScope.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/scopes/impl/FirTypeIntersectionScope.kt @@ -89,7 +89,7 @@ class FirTypeIntersectionScope private constructor( return false } - val allMembersWithScope = membersByScope.flatMapTo(mutableListOf()) { (scope, members) -> + val allMembersWithScope = membersByScope.flatMapTo(linkedSetOf()) { (scope, members) -> members.map { MemberWithBaseScope(it, scope) } } @@ -508,6 +508,14 @@ class FirTypeIntersectionScope private constructor( private class MemberWithBaseScope>(val member: D, val baseScope: FirTypeScope) { operator fun component1() = member operator fun component2() = baseScope + + override fun equals(other: Any?): Boolean { + return other is MemberWithBaseScope<*> && member == other.member + } + + override fun hashCode(): Int { + return member.hashCode() + } } private fun > D.withScope(baseScope: FirTypeScope) = MemberWithBaseScope(this, baseScope) diff --git a/compiler/testData/codegen/bytecodeText/boxingOptimization/kt7224.kt b/compiler/testData/codegen/bytecodeText/boxingOptimization/kt7224.kt index 0308a417e90..b0f044f0422 100644 --- a/compiler/testData/codegen/bytecodeText/boxingOptimization/kt7224.kt +++ b/compiler/testData/codegen/bytecodeText/boxingOptimization/kt7224.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND_FIR: JVM_IR + fun box(): String { 230?.hashCode() diff --git a/compiler/testData/codegen/bytecodeText/inlineClasses/skipCallToUnderlyingValueOfInlineClass.kt b/compiler/testData/codegen/bytecodeText/inlineClasses/skipCallToUnderlyingValueOfInlineClass.kt index bef3467606b..a45f8f0f14c 100644 --- a/compiler/testData/codegen/bytecodeText/inlineClasses/skipCallToUnderlyingValueOfInlineClass.kt +++ b/compiler/testData/codegen/bytecodeText/inlineClasses/skipCallToUnderlyingValueOfInlineClass.kt @@ -1,4 +1,5 @@ // !LANGUAGE: +InlineClasses +// IGNORE_BACKEND_FIR: JVM_IR // FILE: utils.kt diff --git a/compiler/testData/codegen/bytecodeText/jvm8/hashCode/hashCode.kt b/compiler/testData/codegen/bytecodeText/jvm8/hashCode/hashCode.kt index bffb0fbd2fa..fdbac019ff0 100644 --- a/compiler/testData/codegen/bytecodeText/jvm8/hashCode/hashCode.kt +++ b/compiler/testData/codegen/bytecodeText/jvm8/hashCode/hashCode.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // JVM_TARGET: 1.8 fun box(): String { diff --git a/compiler/testData/ir/irText/classes/enumWithMultipleCtors.fir.txt b/compiler/testData/ir/irText/classes/enumWithMultipleCtors.fir.txt index b47a5b26cad..cef61fee30f 100644 --- a/compiler/testData/ir/irText/classes/enumWithMultipleCtors.fir.txt +++ b/compiler/testData/ir/irText/classes/enumWithMultipleCtors.fir.txt @@ -149,7 +149,7 @@ FILE fqName: fileName:/enumWithMultipleCtors.kt VALUE_PARAMETER name:x index:0 type:kotlin.Int BLOCK_BODY ENUM_CONSTRUCTOR_CALL 'private constructor (arg: kotlin.String) declared in .A' - arg: CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.Int' type=kotlin.String origin=null + arg: CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null $this: GET_VAR 'x: kotlin.Int declared in .A.' type=kotlin.Int origin=null CALL 'public final fun (: kotlin.String): kotlin.Unit declared in .A' type=kotlin.Unit origin=EQ $this: GET_VAR ': .A declared in .A' type=.A origin=null @@ -159,15 +159,15 @@ FILE fqName: fileName:/enumWithMultipleCtors.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun f (): kotlin.String declared in .A' STRING_CONCATENATION type=kotlin.String - CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.String' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null $this: CALL 'public final fun (): kotlin.String declared in .A' type=kotlin.String origin=GET_PROPERTY $this: GET_VAR ': .A declared in .A.f' type=.A origin=null CONST String type=kotlin.String value="#" - CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.String' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null $this: CALL 'public final fun (): kotlin.String declared in .A' type=kotlin.String origin=GET_PROPERTY $this: GET_VAR ': .A declared in .A.f' type=.A origin=null CONST String type=kotlin.String value="#" - CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.String' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null $this: CALL 'public final fun (): kotlin.String declared in .A' type=kotlin.String origin=GET_PROPERTY $this: GET_VAR ': .A declared in .A.f' type=.A origin=null FUN ENUM_CLASS_SPECIAL_MEMBER name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<.A> diff --git a/compiler/testData/ir/irText/expressions/breakContinueInWhen.fir.txt b/compiler/testData/ir/irText/expressions/breakContinueInWhen.fir.txt index 68ace031716..fa2946013ce 100644 --- a/compiler/testData/ir/irText/expressions/breakContinueInWhen.fir.txt +++ b/compiler/testData/ir/irText/expressions/breakContinueInWhen.fir.txt @@ -124,7 +124,7 @@ FILE fqName: fileName:/breakContinueInWhen.kt CALL 'public final fun plus (other: kotlin.Any?): kotlin.String [operator] declared in kotlin.String' type=kotlin.String origin=null $this: GET_VAR 'var s: kotlin.String [var] declared in .testContinueDoWhile' type=kotlin.String origin=null other: STRING_CONCATENATION type=kotlin.String - CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.Int' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null $this: GET_VAR 'var k: kotlin.Int [var] declared in .testContinueDoWhile' type=kotlin.Int origin=null CONST String type=kotlin.String value=";" condition: CALL 'public final fun less (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=LT diff --git a/compiler/testData/ir/irText/expressions/equals.fir.txt b/compiler/testData/ir/irText/expressions/equals.fir.txt index 0d6adbd0703..3685c376256 100644 --- a/compiler/testData/ir/irText/expressions/equals.fir.txt +++ b/compiler/testData/ir/irText/expressions/equals.fir.txt @@ -12,7 +12,7 @@ FILE fqName: fileName:/equals.kt VALUE_PARAMETER name:b index:1 type:kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testEquals (a: kotlin.Int, b: kotlin.Int): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Int' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: GET_VAR 'a: kotlin.Int declared in .testEquals' type=kotlin.Int origin=null other: GET_VAR 'b: kotlin.Int declared in .testEquals' type=kotlin.Int origin=null FUN name:testJEqeqNull visibility:public modality:FINAL <> () returnType:kotlin.Boolean @@ -24,6 +24,6 @@ FILE fqName: fileName:/equals.kt FUN name:testJEqualsNull visibility:public modality:FINAL <> () returnType:kotlin.Boolean BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testJEqualsNull (): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Int' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:INT_NULL type:kotlin.Int? visibility:public [static]' type=kotlin.Int? origin=GET_PROPERTY other: CONST Null type=kotlin.Nothing? value=null diff --git a/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointEquals.fir.txt b/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointEquals.fir.txt index f294256fc58..f55cf0a5762 100644 --- a/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointEquals.fir.txt +++ b/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointEquals.fir.txt @@ -4,7 +4,7 @@ FILE fqName: fileName:/floatingPointEquals.kt VALUE_PARAMETER name:y index:1 type:kotlin.Double BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test1d (x: kotlin.Double, y: kotlin.Double): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Double' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: GET_VAR 'x: kotlin.Double declared in .test1d' type=kotlin.Double origin=null other: GET_VAR 'y: kotlin.Double declared in .test1d' type=kotlin.Double origin=null FUN name:test2d visibility:public modality:FINAL <> (x:kotlin.Double, y:kotlin.Double?) returnType:kotlin.Boolean @@ -12,7 +12,7 @@ FILE fqName: fileName:/floatingPointEquals.kt VALUE_PARAMETER name:y index:1 type:kotlin.Double? BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test2d (x: kotlin.Double, y: kotlin.Double?): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Double' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: GET_VAR 'x: kotlin.Double declared in .test2d' type=kotlin.Double origin=null other: GET_VAR 'y: kotlin.Double? declared in .test2d' type=kotlin.Double? origin=null FUN name:test3d visibility:public modality:FINAL <> (x:kotlin.Double, y:kotlin.Any) returnType:kotlin.Boolean @@ -20,7 +20,7 @@ FILE fqName: fileName:/floatingPointEquals.kt VALUE_PARAMETER name:y index:1 type:kotlin.Any BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test3d (x: kotlin.Double, y: kotlin.Any): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Double' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: GET_VAR 'x: kotlin.Double declared in .test3d' type=kotlin.Double origin=null other: GET_VAR 'y: kotlin.Any declared in .test3d' type=kotlin.Any origin=null FUN name:test4d visibility:public modality:FINAL <> (x:kotlin.Double, y:kotlin.Number) returnType:kotlin.Boolean @@ -28,7 +28,7 @@ FILE fqName: fileName:/floatingPointEquals.kt VALUE_PARAMETER name:y index:1 type:kotlin.Number BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test4d (x: kotlin.Double, y: kotlin.Number): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Double' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: GET_VAR 'x: kotlin.Double declared in .test4d' type=kotlin.Double origin=null other: GET_VAR 'y: kotlin.Number declared in .test4d' type=kotlin.Number origin=null FUN name:test5d visibility:public modality:FINAL <> (x:kotlin.Double, y:kotlin.Any) returnType:kotlin.Boolean @@ -40,7 +40,7 @@ FILE fqName: fileName:/floatingPointEquals.kt BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Double GET_VAR 'y: kotlin.Any declared in .test5d' type=kotlin.Any origin=null - then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Double' type=kotlin.Boolean origin=null + then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: GET_VAR 'x: kotlin.Double declared in .test5d' type=kotlin.Double origin=null other: TYPE_OP type=kotlin.Double origin=IMPLICIT_CAST typeOperand=kotlin.Double GET_VAR 'y: kotlin.Any declared in .test5d' type=kotlin.Any origin=null @@ -63,7 +63,7 @@ FILE fqName: fileName:/floatingPointEquals.kt BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false - then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Double' type=kotlin.Boolean origin=null + then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: TYPE_OP type=kotlin.Double origin=IMPLICIT_CAST typeOperand=kotlin.Double GET_VAR 'x: kotlin.Any declared in .test6d' type=kotlin.Any origin=null other: TYPE_OP type=kotlin.Double origin=IMPLICIT_CAST typeOperand=kotlin.Double @@ -76,7 +76,7 @@ FILE fqName: fileName:/floatingPointEquals.kt VALUE_PARAMETER name:y index:1 type:kotlin.Float BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test1f (x: kotlin.Float, y: kotlin.Float): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Float' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: GET_VAR 'x: kotlin.Float declared in .test1f' type=kotlin.Float origin=null other: GET_VAR 'y: kotlin.Float declared in .test1f' type=kotlin.Float origin=null FUN name:test2f visibility:public modality:FINAL <> (x:kotlin.Float, y:kotlin.Float?) returnType:kotlin.Boolean @@ -84,7 +84,7 @@ FILE fqName: fileName:/floatingPointEquals.kt VALUE_PARAMETER name:y index:1 type:kotlin.Float? BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test2f (x: kotlin.Float, y: kotlin.Float?): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Float' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: GET_VAR 'x: kotlin.Float declared in .test2f' type=kotlin.Float origin=null other: GET_VAR 'y: kotlin.Float? declared in .test2f' type=kotlin.Float? origin=null FUN name:test3f visibility:public modality:FINAL <> (x:kotlin.Float, y:kotlin.Any) returnType:kotlin.Boolean @@ -92,7 +92,7 @@ FILE fqName: fileName:/floatingPointEquals.kt VALUE_PARAMETER name:y index:1 type:kotlin.Any BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test3f (x: kotlin.Float, y: kotlin.Any): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Float' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: GET_VAR 'x: kotlin.Float declared in .test3f' type=kotlin.Float origin=null other: GET_VAR 'y: kotlin.Any declared in .test3f' type=kotlin.Any origin=null FUN name:test4f visibility:public modality:FINAL <> (x:kotlin.Float, y:kotlin.Number) returnType:kotlin.Boolean @@ -100,7 +100,7 @@ FILE fqName: fileName:/floatingPointEquals.kt VALUE_PARAMETER name:y index:1 type:kotlin.Number BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test4f (x: kotlin.Float, y: kotlin.Number): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Float' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: GET_VAR 'x: kotlin.Float declared in .test4f' type=kotlin.Float origin=null other: GET_VAR 'y: kotlin.Number declared in .test4f' type=kotlin.Number origin=null FUN name:test5f visibility:public modality:FINAL <> (x:kotlin.Float, y:kotlin.Any) returnType:kotlin.Boolean @@ -112,7 +112,7 @@ FILE fqName: fileName:/floatingPointEquals.kt BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Float GET_VAR 'y: kotlin.Any declared in .test5f' type=kotlin.Any origin=null - then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Float' type=kotlin.Boolean origin=null + then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: GET_VAR 'x: kotlin.Float declared in .test5f' type=kotlin.Float origin=null other: TYPE_OP type=kotlin.Float origin=IMPLICIT_CAST typeOperand=kotlin.Float GET_VAR 'y: kotlin.Any declared in .test5f' type=kotlin.Any origin=null @@ -135,7 +135,7 @@ FILE fqName: fileName:/floatingPointEquals.kt BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false - then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Float' type=kotlin.Boolean origin=null + then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: TYPE_OP type=kotlin.Float origin=IMPLICIT_CAST typeOperand=kotlin.Float GET_VAR 'x: kotlin.Any declared in .test6f' type=kotlin.Any origin=null other: TYPE_OP type=kotlin.Float origin=IMPLICIT_CAST typeOperand=kotlin.Float @@ -159,7 +159,7 @@ FILE fqName: fileName:/floatingPointEquals.kt BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false - then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Float' type=kotlin.Boolean origin=null + then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: TYPE_OP type=kotlin.Float origin=IMPLICIT_CAST typeOperand=kotlin.Float GET_VAR 'x: kotlin.Any declared in .testFD' type=kotlin.Any origin=null other: TYPE_OP type=kotlin.Double origin=IMPLICIT_CAST typeOperand=kotlin.Double @@ -183,7 +183,7 @@ FILE fqName: fileName:/floatingPointEquals.kt BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false - then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Double' type=kotlin.Boolean origin=null + then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: TYPE_OP type=kotlin.Double origin=IMPLICIT_CAST typeOperand=kotlin.Double GET_VAR 'x: kotlin.Any declared in .testDF' type=kotlin.Any origin=null other: TYPE_OP type=kotlin.Float origin=IMPLICIT_CAST typeOperand=kotlin.Float @@ -196,7 +196,7 @@ FILE fqName: fileName:/floatingPointEquals.kt VALUE_PARAMETER name:x index:0 type:kotlin.Float BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test1fr (x: kotlin.Float): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Float' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: GET_VAR ': kotlin.Float declared in .test1fr' type=kotlin.Float origin=null other: GET_VAR 'x: kotlin.Float declared in .test1fr' type=kotlin.Float origin=null FUN name:test2fr visibility:public modality:FINAL <> ($receiver:kotlin.Float, x:kotlin.Float?) returnType:kotlin.Boolean @@ -204,7 +204,7 @@ FILE fqName: fileName:/floatingPointEquals.kt VALUE_PARAMETER name:x index:0 type:kotlin.Float? BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test2fr (x: kotlin.Float?): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Float' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: GET_VAR ': kotlin.Float declared in .test2fr' type=kotlin.Float origin=null other: GET_VAR 'x: kotlin.Float? declared in .test2fr' type=kotlin.Float? origin=null FUN name:test3fr visibility:public modality:FINAL <> ($receiver:kotlin.Float, x:kotlin.Any) returnType:kotlin.Boolean @@ -212,7 +212,7 @@ FILE fqName: fileName:/floatingPointEquals.kt VALUE_PARAMETER name:x index:0 type:kotlin.Any BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test3fr (x: kotlin.Any): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Float' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: GET_VAR ': kotlin.Float declared in .test3fr' type=kotlin.Float origin=null other: GET_VAR 'x: kotlin.Any declared in .test3fr' type=kotlin.Any origin=null FUN name:test4fr visibility:public modality:FINAL <> ($receiver:kotlin.Float, x:kotlin.Number) returnType:kotlin.Boolean @@ -220,7 +220,7 @@ FILE fqName: fileName:/floatingPointEquals.kt VALUE_PARAMETER name:x index:0 type:kotlin.Number BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test4fr (x: kotlin.Number): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Float' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: GET_VAR ': kotlin.Float declared in .test4fr' type=kotlin.Float origin=null other: GET_VAR 'x: kotlin.Number declared in .test4fr' type=kotlin.Number origin=null FUN name:test5fr visibility:public modality:FINAL <> ($receiver:kotlin.Float, x:kotlin.Any) returnType:kotlin.Boolean @@ -232,7 +232,7 @@ FILE fqName: fileName:/floatingPointEquals.kt BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Float GET_VAR 'x: kotlin.Any declared in .test5fr' type=kotlin.Any origin=null - then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Float' type=kotlin.Boolean origin=null + then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: GET_VAR ': kotlin.Float declared in .test5fr' type=kotlin.Float origin=null other: TYPE_OP type=kotlin.Float origin=IMPLICIT_CAST typeOperand=kotlin.Float GET_VAR 'x: kotlin.Any declared in .test5fr' type=kotlin.Any origin=null @@ -248,7 +248,7 @@ FILE fqName: fileName:/floatingPointEquals.kt BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Double GET_VAR 'x: kotlin.Any declared in .test6fr' type=kotlin.Any origin=null - then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Float' type=kotlin.Boolean origin=null + then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: GET_VAR ': kotlin.Float declared in .test6fr' type=kotlin.Float origin=null other: TYPE_OP type=kotlin.Double origin=IMPLICIT_CAST typeOperand=kotlin.Double GET_VAR 'x: kotlin.Any declared in .test6fr' type=kotlin.Any origin=null diff --git a/compiler/testData/ir/irText/expressions/kt28006.fir.txt b/compiler/testData/ir/irText/expressions/kt28006.fir.txt index 7e5f072c732..2df56df1066 100644 --- a/compiler/testData/ir/irText/expressions/kt28006.fir.txt +++ b/compiler/testData/ir/irText/expressions/kt28006.fir.txt @@ -60,14 +60,14 @@ FILE fqName: fileName:/kt28006.kt STRING_CONCATENATION type=kotlin.String CONST String type=kotlin.String value="\uD83E" CONST String type=kotlin.String value="\uDD17" - CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.Int' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null $this: GET_VAR 'x: kotlin.Int declared in .test1' type=kotlin.Int origin=null FUN name:test2 visibility:public modality:FINAL <> (x:kotlin.Int) returnType:kotlin.String VALUE_PARAMETER name:x index:0 type:kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test2 (x: kotlin.Int): kotlin.String declared in ' STRING_CONCATENATION type=kotlin.String - CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.Int' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null $this: GET_VAR 'x: kotlin.Int declared in .test2' type=kotlin.Int origin=null CONST String type=kotlin.String value="\uD83E" CONST String type=kotlin.String value="\uDD17" @@ -76,9 +76,9 @@ FILE fqName: fileName:/kt28006.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test3 (x: kotlin.Int): kotlin.String declared in ' STRING_CONCATENATION type=kotlin.String - CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.Int' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null $this: GET_VAR 'x: kotlin.Int declared in .test3' type=kotlin.Int origin=null CONST String type=kotlin.String value="\uD83E" CONST String type=kotlin.String value="\uDD17" - CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.Int' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null $this: GET_VAR 'x: kotlin.Int declared in .test3' type=kotlin.Int origin=null diff --git a/compiler/testData/ir/irText/expressions/kt30020.fir.txt b/compiler/testData/ir/irText/expressions/kt30020.fir.txt index 1c57f6ea4a7..d45c3e9edb3 100644 --- a/compiler/testData/ir/irText/expressions/kt30020.fir.txt +++ b/compiler/testData/ir/irText/expressions/kt30020.fir.txt @@ -240,16 +240,13 @@ FILE fqName: fileName:/kt30020.kt 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 - public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.collections.MutableCollection $this: VALUE_PARAMETER name: 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 - public open fun hashCode (): kotlin.Int [fake_override] declared in kotlin.collections.MutableCollection $this: VALUE_PARAMETER name: 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 - public open fun toString (): kotlin.String [fake_override] declared in kotlin.collections.MutableCollection $this: VALUE_PARAMETER name: type:kotlin.Any diff --git a/compiler/testData/ir/irText/expressions/objectReferenceInFieldInitializer.fir.txt b/compiler/testData/ir/irText/expressions/objectReferenceInFieldInitializer.fir.txt index 65e3dc07cc8..8d9e4bdfe95 100644 --- a/compiler/testData/ir/irText/expressions/objectReferenceInFieldInitializer.fir.txt +++ b/compiler/testData/ir/irText/expressions/objectReferenceInFieldInitializer.fir.txt @@ -21,7 +21,7 @@ FILE fqName: fileName:/objectReferenceInFieldInitializer.kt EXPRESSION_BODY STRING_CONCATENATION type=kotlin.String CONST String type=kotlin.String value="1234" - CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.String' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null $this: CALL 'private final fun (): kotlin.String declared in .A' type=kotlin.String origin=GET_PROPERTY $this: GET_VAR ': .A declared in .A' type=.A origin=null FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:private modality:FINAL <> ($this:.A) returnType:kotlin.String diff --git a/compiler/testData/ir/irText/expressions/safeCalls.fir.txt b/compiler/testData/ir/irText/expressions/safeCalls.fir.txt index 89b6504723b..0099bec0a0b 100644 --- a/compiler/testData/ir/irText/expressions/safeCalls.fir.txt +++ b/compiler/testData/ir/irText/expressions/safeCalls.fir.txt @@ -92,7 +92,7 @@ FILE fqName: fileName:/safeCalls.kt then: CONST Null type=kotlin.Nothing? value=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: CALL 'public open fun hashCode (): kotlin.Int [fake_override] declared in kotlin.String' type=kotlin.Int origin=null + then: CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null $this: GET_VAR 'val tmp_1: kotlin.String? [val] declared in .test2' type=kotlin.String? origin=null FUN name:test3 visibility:public modality:FINAL <> (x:kotlin.String?, y:kotlin.Any?) returnType:kotlin.Boolean? VALUE_PARAMETER name:x index:0 type:kotlin.String? @@ -110,7 +110,7 @@ FILE fqName: fileName:/safeCalls.kt then: CONST Null type=kotlin.Nothing? value=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.String' type=kotlin.Boolean origin=null + then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: GET_VAR 'val tmp_2: kotlin.String? [val] declared in .test3' type=kotlin.String? origin=null other: GET_VAR 'y: kotlin.Any? declared in .test3' type=kotlin.Any? origin=null FUN name:test4 visibility:public modality:FINAL <> (x:.Ref?) returnType:kotlin.Unit diff --git a/compiler/testData/ir/irText/expressions/stringTemplates.fir.txt b/compiler/testData/ir/irText/expressions/stringTemplates.fir.txt index 6101d3b3acc..ffe4eff3539 100644 --- a/compiler/testData/ir/irText/expressions/stringTemplates.fir.txt +++ b/compiler/testData/ir/irText/expressions/stringTemplates.fir.txt @@ -61,10 +61,10 @@ FILE fqName: fileName:/stringTemplates.kt FIELD PROPERTY_BACKING_FIELD name:test6 type:kotlin.String visibility:private [final,static] EXPRESSION_BODY STRING_CONCATENATION type=kotlin.String - CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.String' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null $this: CALL 'public final fun (): kotlin.String declared in ' type=kotlin.String origin=GET_PROPERTY CONST String type=kotlin.String value=" " - CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.String' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null $this: CALL 'public final fun foo (): kotlin.String declared in ' type=kotlin.String origin=null FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String correspondingProperty: PROPERTY name:test6 visibility:public modality:FINAL [val] @@ -75,7 +75,7 @@ FILE fqName: fileName:/stringTemplates.kt FIELD PROPERTY_BACKING_FIELD name:test7 type:kotlin.String visibility:private [final,static] EXPRESSION_BODY STRING_CONCATENATION type=kotlin.String - CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.String' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null $this: CALL 'public final fun (): kotlin.String declared in ' type=kotlin.String origin=GET_PROPERTY FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String correspondingProperty: PROPERTY name:test7 visibility:public modality:FINAL [val] @@ -86,7 +86,7 @@ FILE fqName: fileName:/stringTemplates.kt FIELD PROPERTY_BACKING_FIELD name:test8 type:kotlin.String visibility:private [final,static] EXPRESSION_BODY STRING_CONCATENATION type=kotlin.String - CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.String' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null $this: CALL 'public final fun foo (): kotlin.String declared in ' type=kotlin.String origin=null FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String correspondingProperty: PROPERTY name:test8 visibility:public modality:FINAL [val] @@ -97,7 +97,7 @@ FILE fqName: fileName:/stringTemplates.kt FIELD PROPERTY_BACKING_FIELD name:test9 type:kotlin.String visibility:private [final,static] EXPRESSION_BODY STRING_CONCATENATION type=kotlin.String - CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.Int' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null $this: CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String correspondingProperty: PROPERTY name:test9 visibility:public modality:FINAL [val] diff --git a/compiler/testData/ir/irText/firProblems/DelegationAndInheritanceFromJava.fir.txt b/compiler/testData/ir/irText/firProblems/DelegationAndInheritanceFromJava.fir.txt index d72caa18324..9c8a43fdf46 100644 --- a/compiler/testData/ir/irText/firProblems/DelegationAndInheritanceFromJava.fir.txt +++ b/compiler/testData/ir/irText/firProblems/DelegationAndInheritanceFromJava.fir.txt @@ -126,16 +126,16 @@ FILE fqName: fileName:/DelegationAndInheritanceFromJava.kt FIELD DELEGATE name:<$$delegate_0> type:.Foo.B visibility:local [final] 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 kotlin.collections.MutableSet + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any $this: VALUE_PARAMETER name: 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 kotlin.collections.MutableSet + public open fun hashCode (): kotlin.Int declared in kotlin.Any $this: VALUE_PARAMETER name: 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 kotlin.collections.MutableSet + public open fun toString (): kotlin.String declared in kotlin.Any $this: VALUE_PARAMETER name: type:kotlin.Any FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String BLOCK_BODY diff --git a/compiler/testData/ir/irText/firProblems/inapplicableCollectionSet.fir.txt b/compiler/testData/ir/irText/firProblems/inapplicableCollectionSet.fir.txt index d9583317f9e..5cfce3a233f 100644 --- a/compiler/testData/ir/irText/firProblems/inapplicableCollectionSet.fir.txt +++ b/compiler/testData/ir/irText/firProblems/inapplicableCollectionSet.fir.txt @@ -50,7 +50,7 @@ FILE fqName: fileName:/inapplicableCollectionSet.kt $this: CALL 'private final fun (): kotlin.collections.MutableMap.Flaf> declared in .Flaf' type=kotlin.collections.MutableMap.Flaf> origin=GET_PROPERTY $this: GET_VAR ': .Flaf declared in .Flaf.forJavaName' type=.Flaf origin=null key: STRING_CONCATENATION type=kotlin.String - CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.String' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null $this: GET_VAR 'javaName: kotlin.String declared in .Flaf.forJavaName' type=kotlin.String origin=null CONST String type=kotlin.String value="_alternative" WHEN type=kotlin.Unit origin=IF diff --git a/compiler/testData/ir/irText/regressions/coercionInLoop.fir.txt b/compiler/testData/ir/irText/regressions/coercionInLoop.fir.txt index fecdbd66787..2b17c259ea0 100644 --- a/compiler/testData/ir/irText/regressions/coercionInLoop.fir.txt +++ b/compiler/testData/ir/irText/regressions/coercionInLoop.fir.txt @@ -25,7 +25,7 @@ FILE fqName: fileName:/coercionInLoop.kt then: RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in ' STRING_CONCATENATION type=kotlin.String CONST String type=kotlin.String value="Fail " - CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.Int' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null $this: GET_VAR 'var i: kotlin.Int [var] declared in .box' type=kotlin.Int origin=null VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Int [val] GET_VAR 'var i: kotlin.Int [var] declared in .box' type=kotlin.Int origin=null diff --git a/compiler/testData/ir/irText/types/nullChecks/explicitEqualsAndCompareToCallsOnPlatformTypeReceiver.fir.txt b/compiler/testData/ir/irText/types/nullChecks/explicitEqualsAndCompareToCallsOnPlatformTypeReceiver.fir.txt index 63b46434e8f..f2665698e8b 100644 --- a/compiler/testData/ir/irText/types/nullChecks/explicitEqualsAndCompareToCallsOnPlatformTypeReceiver.fir.txt +++ b/compiler/testData/ir/irText/types/nullChecks/explicitEqualsAndCompareToCallsOnPlatformTypeReceiver.fir.txt @@ -3,7 +3,7 @@ FILE fqName: fileName:/explicitEqualsAndCompareToCallsOnPlatformTypeReceiv $receiver: VALUE_PARAMETER name: type:.JavaClass BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testPlatformEqualsPlatform (): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Double' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: CALL 'public open fun null0 (): kotlin.Double? declared in .JavaClass' type=kotlin.Double? origin=null $this: GET_VAR ': .JavaClass declared in .testPlatformEqualsPlatform' type=.JavaClass origin=null other: CALL 'public open fun null0 (): kotlin.Double? declared in .JavaClass' type=kotlin.Double? origin=null @@ -12,7 +12,7 @@ FILE fqName: fileName:/explicitEqualsAndCompareToCallsOnPlatformTypeReceiv $receiver: VALUE_PARAMETER name: type:.JavaClass BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testPlatformEqualsKotlin (): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Double' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: CALL 'public open fun null0 (): kotlin.Double? declared in .JavaClass' type=kotlin.Double? origin=null $this: GET_VAR ': .JavaClass declared in .testPlatformEqualsKotlin' type=.JavaClass origin=null other: CONST Double type=kotlin.Double value=0.0 @@ -20,7 +20,7 @@ FILE fqName: fileName:/explicitEqualsAndCompareToCallsOnPlatformTypeReceiv $receiver: VALUE_PARAMETER name: type:.JavaClass BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testKotlinEqualsPlatform (): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Double' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: CONST Double type=kotlin.Double value=0.0 other: CALL 'public open fun null0 (): kotlin.Double? declared in .JavaClass' type=kotlin.Double? origin=null $this: GET_VAR ': .JavaClass declared in .testKotlinEqualsPlatform' type=.JavaClass origin=null diff --git a/compiler/testData/ir/irText/types/nullChecks/platformTypeReceiver.fir.txt b/compiler/testData/ir/irText/types/nullChecks/platformTypeReceiver.fir.txt index a95f15b79e0..54a0a35dedb 100644 --- a/compiler/testData/ir/irText/types/nullChecks/platformTypeReceiver.fir.txt +++ b/compiler/testData/ir/irText/types/nullChecks/platformTypeReceiver.fir.txt @@ -2,12 +2,12 @@ FILE fqName: fileName:/platformTypeReceiver.kt FUN name:test1 visibility:public modality:FINAL <> () returnType:kotlin.Boolean BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test1 (): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Boolean' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:BOOL_NULL type:kotlin.Boolean? visibility:public [static]' type=kotlin.Boolean? origin=GET_PROPERTY other: CONST Null type=kotlin.Nothing? value=null FUN name:test2 visibility:public modality:FINAL <> () returnType:kotlin.Boolean BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test2 (): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Boolean' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: CALL 'public open fun boolNull (): kotlin.Boolean? declared in .J' type=kotlin.Boolean? origin=null other: CONST Null type=kotlin.Nothing? value=null diff --git a/idea/idea-frontend-fir/testData/memberScopeByFqName/Int.txt b/idea/idea-frontend-fir/testData/memberScopeByFqName/Int.txt index 2dfb1a22f68..d211fd3220a 100644 --- a/idea/idea-frontend-fir/testData/memberScopeByFqName/Int.txt +++ b/idea/idea-frontend-fir/testData/memberScopeByFqName/Int.txt @@ -1223,8 +1223,8 @@ KtFirFunctionSymbol: annotatedType: [] kotlin/Boolean annotationClassIds: [] annotations: [] - callableIdIfNonLocal: kotlin.Int.equals - dispatchType: kotlin/Int + callableIdIfNonLocal: kotlin.Any.equals + dispatchType: kotlin/Any isExtension: false isExternal: false isInline: false @@ -1233,7 +1233,7 @@ KtFirFunctionSymbol: isSuspend: false modality: OPEN name: equals - origin: INTERSECTION_OVERRIDE + origin: LIBRARY receiverType: null symbolKind: MEMBER typeParameters: [] @@ -1244,8 +1244,8 @@ KtFirFunctionSymbol: annotatedType: [] kotlin/Int annotationClassIds: [] annotations: [] - callableIdIfNonLocal: kotlin.Int.hashCode - dispatchType: kotlin/Int + callableIdIfNonLocal: kotlin.Any.hashCode + dispatchType: kotlin/Any isExtension: false isExternal: false isInline: false @@ -1254,7 +1254,7 @@ KtFirFunctionSymbol: isSuspend: false modality: OPEN name: hashCode - origin: INTERSECTION_OVERRIDE + origin: LIBRARY receiverType: null symbolKind: MEMBER typeParameters: [] @@ -1265,8 +1265,8 @@ KtFirFunctionSymbol: annotatedType: [] kotlin/String annotationClassIds: [] annotations: [] - callableIdIfNonLocal: kotlin.Int.toString - dispatchType: kotlin/Int + callableIdIfNonLocal: kotlin.Any.toString + dispatchType: kotlin/Any isExtension: false isExternal: false isInline: false @@ -1275,7 +1275,7 @@ KtFirFunctionSymbol: isSuspend: false modality: OPEN name: toString - origin: INTERSECTION_OVERRIDE + origin: LIBRARY receiverType: null symbolKind: MEMBER typeParameters: [] diff --git a/idea/idea-frontend-fir/testData/memberScopeByFqName/MutableList.txt b/idea/idea-frontend-fir/testData/memberScopeByFqName/MutableList.txt index f1ee3b5e269..47ece7fb3f1 100644 --- a/idea/idea-frontend-fir/testData/memberScopeByFqName/MutableList.txt +++ b/idea/idea-frontend-fir/testData/memberScopeByFqName/MutableList.txt @@ -449,8 +449,8 @@ KtFirFunctionSymbol: annotatedType: [] kotlin/Boolean annotationClassIds: [] annotations: [] - callableIdIfNonLocal: kotlin.collections.MutableList.equals - dispatchType: kotlin/collections/MutableList + callableIdIfNonLocal: kotlin.Any.equals + dispatchType: kotlin/Any isExtension: false isExternal: false isInline: false @@ -459,7 +459,7 @@ KtFirFunctionSymbol: isSuspend: false modality: OPEN name: equals - origin: INTERSECTION_OVERRIDE + origin: LIBRARY receiverType: null symbolKind: MEMBER typeParameters: [] @@ -470,8 +470,8 @@ KtFirFunctionSymbol: annotatedType: [] kotlin/Int annotationClassIds: [] annotations: [] - callableIdIfNonLocal: kotlin.collections.MutableList.hashCode - dispatchType: kotlin/collections/MutableList + callableIdIfNonLocal: kotlin.Any.hashCode + dispatchType: kotlin/Any isExtension: false isExternal: false isInline: false @@ -480,7 +480,7 @@ KtFirFunctionSymbol: isSuspend: false modality: OPEN name: hashCode - origin: INTERSECTION_OVERRIDE + origin: LIBRARY receiverType: null symbolKind: MEMBER typeParameters: [] @@ -491,8 +491,8 @@ KtFirFunctionSymbol: annotatedType: [] kotlin/String annotationClassIds: [] annotations: [] - callableIdIfNonLocal: kotlin.collections.MutableList.toString - dispatchType: kotlin/collections/MutableList + callableIdIfNonLocal: kotlin.Any.toString + dispatchType: kotlin/Any isExtension: false isExternal: false isInline: false @@ -501,7 +501,7 @@ KtFirFunctionSymbol: isSuspend: false modality: OPEN name: toString - origin: INTERSECTION_OVERRIDE + origin: LIBRARY receiverType: null symbolKind: MEMBER typeParameters: []