[FIR] Properly set isOperator flag for java functions

^KT-56875 Fixed
This commit is contained in:
Dmitriy Novozhilov
2023-02-22 16:34:39 +02:00
committed by Space Team
parent df47581c5a
commit 244dbb37cf
21 changed files with 368 additions and 256 deletions
+6 -6
View File
@@ -15,12 +15,12 @@ FILE fqName:<root> fileName:/kt43217.kt
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.DoubleExpression'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.DoubleExpression]'
FUN name:get visibility:public modality:OPEN <> ($this:<root>.A.b.<no name provided>) returnType:kotlin.Double [operator]
FUN name:get visibility:public modality:OPEN <> ($this:<root>.A.b.<no name provided>) returnType:kotlin.Double
overridden:
public abstract fun get (): @[EnhancedNullability] kotlin.Double [fake_override,operator] declared in <root>.DoubleExpression
public abstract fun get (): @[EnhancedNullability] kotlin.Double [fake_override] declared in <root>.DoubleExpression
$this: VALUE_PARAMETER name:<this> type:<root>.A.b.<no name provided>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun get (): kotlin.Double [operator] declared in <root>.A.b.<no name provided>'
RETURN type=kotlin.Nothing from='public open fun get (): kotlin.Double declared in <root>.A.b.<no name provided>'
CONST Double type=kotlin.Double value=0.0
FUN FAKE_OVERRIDE name:isEqualTo visibility:public modality:OPEN <> ($this:<root>.DoubleExpression, value:kotlin.Double) returnType:@[EnhancedNullability] kotlin.Any [fake_override]
annotations:
@@ -79,12 +79,12 @@ FILE fqName:<root> fileName:/kt43217.kt
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.DoubleExpression'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C modality:FINAL visibility:public superTypes:[<root>.DoubleExpression]'
FUN name:get visibility:public modality:OPEN <> ($this:<root>.C) returnType:kotlin.Double [operator]
FUN name:get visibility:public modality:OPEN <> ($this:<root>.C) returnType:kotlin.Double
overridden:
public abstract fun get (): @[EnhancedNullability] kotlin.Double [fake_override,operator] declared in <root>.DoubleExpression
public abstract fun get (): @[EnhancedNullability] kotlin.Double [fake_override] declared in <root>.DoubleExpression
$this: VALUE_PARAMETER name:<this> type:<root>.C
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun get (): kotlin.Double [operator] declared in <root>.C'
RETURN type=kotlin.Nothing from='public open fun get (): kotlin.Double declared in <root>.C'
CONST Double type=kotlin.Double value=0.0
FUN FAKE_OVERRIDE name:isEqualTo visibility:public modality:OPEN <> ($this:<root>.DoubleExpression, value:kotlin.Double) returnType:@[EnhancedNullability] kotlin.Any [fake_override]
annotations:
+2 -2
View File
@@ -14,7 +14,7 @@ class A {
}
override operator fun get(): Double {
override fun get(): Double {
return 0.0
}
@@ -33,7 +33,7 @@ class C : DoubleExpression {
}
override operator fun get(): Double {
override fun get(): Double {
return 0.0
}
@@ -7,7 +7,7 @@ FILE fqName:<root> fileName:/exclExclOnPlatformType.kt
CALL 'public final fun use (a: kotlin.Any): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
a: CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.String origin=EXCLEXCL
<T0>: kotlin.String
arg0: CALL 'public open fun get (): T of java.lang.ref.WeakReference? [fake_override,operator] declared in java.lang.ref.WeakReference' type=kotlin.String? origin=null
arg0: CALL 'public open fun get (): T of java.lang.ref.WeakReference? [fake_override] declared in java.lang.ref.WeakReference' type=kotlin.String? origin=null
$this: CONSTRUCTOR_CALL 'public constructor <init> (p0: @[FlexibleNullability] T of java.lang.ref.WeakReference?) declared in java.lang.ref.WeakReference' type=java.lang.ref.WeakReference<@[FlexibleNullability] kotlin.String?> origin=null
<class: T>: @[FlexibleNullability] kotlin.String?
p0: CONST String type=kotlin.String value=""