diff --git a/compiler/fir/fir2ir/jvm-backend/src/org/jetbrains/kotlin/fir/backend/jvm/FirJvmMangleComputer.kt b/compiler/fir/fir2ir/jvm-backend/src/org/jetbrains/kotlin/fir/backend/jvm/FirJvmMangleComputer.kt index e53352777fd..379af1ea5d0 100644 --- a/compiler/fir/fir2ir/jvm-backend/src/org/jetbrains/kotlin/fir/backend/jvm/FirJvmMangleComputer.kt +++ b/compiler/fir/fir2ir/jvm-backend/src/org/jetbrains/kotlin/fir/backend/jvm/FirJvmMangleComputer.kt @@ -223,6 +223,10 @@ open class FirJvmMangleComputer( if (type.isMarkedNullable) { tBuilder.appendSignature(MangleConstant.Q_MARK) } + + if (type.hasEnhancedNullability) { + tBuilder.appendSignature(MangleConstant.ENHANCED_NULLABILITY_MARK) + } } is ConeFlexibleType -> { // TODO: is that correct way to mangle flexible type? diff --git a/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java index b818870e693..8c37ec6734e 100644 --- a/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java @@ -15969,6 +15969,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/javaInterop/genericSamSmartcast.kt"); } + @TestMetadata("kt43217.kt") + public void testKt43217() throws Exception { + runTest("compiler/testData/codegen/box/javaInterop/kt43217.kt"); + } + @TestMetadata("lambdaInstanceOf.kt") public void testLambdaInstanceOf() throws Exception { runTest("compiler/testData/codegen/box/javaInterop/lambdaInstanceOf.kt"); diff --git a/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/fir/Fir2IrTextTestGenerated.java b/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/fir/Fir2IrTextTestGenerated.java index 043d3423b26..d2b5eacc7f3 100644 --- a/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/fir/Fir2IrTextTestGenerated.java +++ b/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/fir/Fir2IrTextTestGenerated.java @@ -196,6 +196,11 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest { runTest("compiler/testData/ir/irText/classes/kt31649.kt"); } + @TestMetadata("kt43217.kt") + public void testKt43217() throws Exception { + runTest("compiler/testData/ir/irText/classes/kt43217.kt"); + } + @TestMetadata("lambdaInDataClassDefaultParameter.kt") public void testLambdaInDataClassDefaultParameter() throws Exception { runTest("compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.kt"); diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/SymbolTable.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/SymbolTable.kt index 4e58d7b3ef5..f63973ae2b5 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/SymbolTable.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/SymbolTable.kt @@ -85,7 +85,7 @@ class SymbolTable( @Suppress("LeakingThis") val lazyWrapper = IrLazySymbolTable(this) - private abstract inner class SymbolTableBase> { + private abstract class SymbolTableBase> { val unboundSymbols = linkedSetOf() abstract fun get(d: D): S? diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/mangle/MangleConstant.kt b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/mangle/MangleConstant.kt index 9c5de29d8f1..11b25a989f6 100644 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/mangle/MangleConstant.kt +++ b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/mangle/MangleConstant.kt @@ -16,6 +16,7 @@ enum class MangleConstant(val prefix: Char, val separator: Char, val suffix: Cha const val VAR_ARG_MARK = "..." const val STAR_MARK = '*' const val Q_MARK = '?' + const val ENHANCED_NULLABILITY_MARK = "{EnhancedNullability}" const val EXPECT_MARK = "#expect" const val UNKNOWN_MARK = "" const val DYNAMIC_MARK = "" diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/mangle/descriptor/DescriptorMangleComputer.kt b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/mangle/descriptor/DescriptorMangleComputer.kt index 3ebd612d69b..13c61d365dc 100644 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/mangle/descriptor/DescriptorMangleComputer.kt +++ b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/mangle/descriptor/DescriptorMangleComputer.kt @@ -10,7 +10,9 @@ import org.jetbrains.kotlin.backend.common.serialization.mangle.MangleConstant import org.jetbrains.kotlin.backend.common.serialization.mangle.MangleMode import org.jetbrains.kotlin.backend.common.serialization.mangle.collectForMangler import org.jetbrains.kotlin.descriptors.* +import org.jetbrains.kotlin.load.java.typeEnhancement.hasEnhancedNullability import org.jetbrains.kotlin.types.* +import org.jetbrains.kotlin.types.checker.SimpleClassicTypeSystemContext import org.jetbrains.kotlin.types.typeUtil.isUnit import org.jetbrains.kotlin.utils.addToStdlib.ifNotEmpty @@ -188,6 +190,11 @@ abstract class DescriptorMangleComputer(protected val builder: StringBuilder, pr } if (type.isMarkedNullable) tBuilder.appendSignature(MangleConstant.Q_MARK) + + // Disambiguate between 'double' and '@NotNull java.lang.Double' types in mixed Java/Kotlin class hierarchies + if (SimpleClassicTypeSystemContext.hasEnhancedNullability(type)) { + tBuilder.appendSignature(MangleConstant.ENHANCED_NULLABILITY_MARK) + } } is DynamicType -> tBuilder.appendSignature(MangleConstant.DYNAMIC_MARK) is FlexibleType -> { diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/mangle/ir/IrMangleComputer.kt b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/mangle/ir/IrMangleComputer.kt index d6f505833c8..e111038fd4f 100644 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/mangle/ir/IrMangleComputer.kt +++ b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/mangle/ir/IrMangleComputer.kt @@ -12,9 +12,11 @@ import org.jetbrains.kotlin.ir.declarations.* import org.jetbrains.kotlin.ir.symbols.IrClassSymbol import org.jetbrains.kotlin.ir.symbols.IrTypeParameterSymbol import org.jetbrains.kotlin.ir.types.* +import org.jetbrains.kotlin.ir.util.hasAnnotation import org.jetbrains.kotlin.ir.util.isVararg import org.jetbrains.kotlin.ir.util.render import org.jetbrains.kotlin.ir.visitors.IrElementVisitor +import org.jetbrains.kotlin.load.java.JvmAnnotationNames import org.jetbrains.kotlin.types.Variance import org.jetbrains.kotlin.utils.addToStdlib.ifNotEmpty @@ -178,6 +180,10 @@ abstract class IrMangleComputer(protected val builder: StringBuilder, private va } if (type.hasQuestionMark) tBuilder.appendSignature(MangleConstant.Q_MARK) + + if (type.hasAnnotation(JvmAnnotationNames.ENHANCED_NULLABILITY_ANNOTATION)) { + tBuilder.append(MangleConstant.ENHANCED_NULLABILITY_MARK) + } } is IrDynamicType -> tBuilder.appendSignature(MangleConstant.DYNAMIC_MARK) is IrErrorType -> tBuilder.appendSignature(MangleConstant.ERROR_MARK) diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/signature/IdSignatureDescriptor.kt b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/signature/IdSignatureDescriptor.kt index 049a4130089..c97fcfef86a 100644 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/signature/IdSignatureDescriptor.kt +++ b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/signature/IdSignatureDescriptor.kt @@ -6,7 +6,6 @@ package org.jetbrains.kotlin.backend.common.serialization.signature import org.jetbrains.kotlin.descriptors.* -import org.jetbrains.kotlin.ir.declarations.IrSimpleFunction import org.jetbrains.kotlin.ir.descriptors.WrappedDeclarationDescriptor import org.jetbrains.kotlin.ir.util.IdSignature import org.jetbrains.kotlin.ir.util.IdSignatureComposer diff --git a/compiler/testData/codegen/box/javaInterop/kt43217.kt b/compiler/testData/codegen/box/javaInterop/kt43217.kt new file mode 100644 index 00000000000..b4ad9c9037c --- /dev/null +++ b/compiler/testData/codegen/box/javaInterop/kt43217.kt @@ -0,0 +1,57 @@ +// TARGET_BACKEND: JVM +// FILE: kt43217.kt +class A { + private val b = + object : DoubleExpression() { + override fun get(): Double { + return 0.0 + } + } + + val test: DoubleExpression = b +} + +class C : DoubleExpression() { + override fun get() = 0.0 +} + +fun box(): String { + if (A().test.get() != 0.0) throw AssertionError("A().test.get() != 0.0") + + if (C().get() != 0.0) throw AssertionError("C().get() != 0.0") + + return "OK" +} + +// FILE: DoubleExpression.java +import org.jetbrains.annotations.NotNull; + +public abstract class DoubleExpression implements ObservableDouble { + @NotNull + @Override + public Object isEqualTo(double value) { + return null; + } +} + +// FILE: ObservableValue.java +import org.jetbrains.annotations.NotNull; + +public interface ObservableValue { + @NotNull + T get(); + + @NotNull + default Object isEqualTo(@NotNull T value) { + return null; + } +} + +// FILE: ObservableDouble.java +import org.jetbrains.annotations.NotNull; + +public interface ObservableDouble extends ObservableValue { + @NotNull + Object isEqualTo(double value); +} + diff --git a/compiler/testData/codegen/bytecodeListing/kt43217.kt b/compiler/testData/codegen/bytecodeListing/kt43217.kt new file mode 100644 index 00000000000..a62b2547b78 --- /dev/null +++ b/compiler/testData/codegen/bytecodeListing/kt43217.kt @@ -0,0 +1,46 @@ +// FILE: kt43217.kt +class A { + private val b = + object : DoubleExpression() { + override fun get(): Double { + return 0.0 + } + } +} + +class C : DoubleExpression() { + override fun get() = 0.0 +} + +// FILE: DoubleExpression.java +import org.jetbrains.annotations.NotNull; + +public abstract class DoubleExpression implements ObservableDouble { + @NotNull + @Override + public Object isEqualTo(double value) { + return null; + } +} + +// FILE: ObservableValue.java +import org.jetbrains.annotations.NotNull; + +public interface ObservableValue { + @NotNull + T get(); + + @NotNull + default Object isEqualTo(@NotNull T value) { + return null; + } +} + +// FILE: ObservableDouble.java +import org.jetbrains.annotations.NotNull; + +public interface ObservableDouble extends ObservableValue { + @NotNull + Object isEqualTo(double value); +} + diff --git a/compiler/testData/codegen/bytecodeListing/kt43217.txt b/compiler/testData/codegen/bytecodeListing/kt43217.txt new file mode 100644 index 00000000000..5f3451d1fac --- /dev/null +++ b/compiler/testData/codegen/bytecodeListing/kt43217.txt @@ -0,0 +1,25 @@ +@kotlin.Metadata +public final class A$b$1 { + // source: 'kt43217.kt' + enclosing method A.()V + inner (anonymous) class A$b$1 + method (): void + public @org.jetbrains.annotations.NotNull method get(): java.lang.Double + public synthetic bridge method get(): java.lang.Object +} + +@kotlin.Metadata +public final class A { + // source: 'kt43217.kt' + private final field b: A$b$1 + inner (anonymous) class A$b$1 + public method (): void +} + +@kotlin.Metadata +public final class C { + // source: 'kt43217.kt' + public method (): void + public @org.jetbrains.annotations.NotNull method get(): java.lang.Double + public synthetic bridge method get(): java.lang.Object +} diff --git a/compiler/testData/codegen/bytecodeListing/kt43217_ir.txt b/compiler/testData/codegen/bytecodeListing/kt43217_ir.txt new file mode 100644 index 00000000000..696384c44a5 --- /dev/null +++ b/compiler/testData/codegen/bytecodeListing/kt43217_ir.txt @@ -0,0 +1,25 @@ +@kotlin.Metadata +public final class A$b$1 { + // source: 'kt43217.kt' + enclosing method A.()V + inner (anonymous) class A$b$1 + method (): void + public @org.jetbrains.annotations.NotNull method get(): java.lang.Double + public synthetic bridge method get(): java.lang.Object +} + +@kotlin.Metadata +public final class A { + // source: 'kt43217.kt' + private final @org.jetbrains.annotations.NotNull field b: A$b$1 + inner (anonymous) class A$b$1 + public method (): void +} + +@kotlin.Metadata +public final class C { + // source: 'kt43217.kt' + public method (): void + public @org.jetbrains.annotations.NotNull method get(): java.lang.Double + public synthetic bridge method get(): java.lang.Object +} diff --git a/compiler/testData/ir/irText/classes/kt43217.fir.txt b/compiler/testData/ir/irText/classes/kt43217.fir.txt new file mode 100644 index 00000000000..175f2278d01 --- /dev/null +++ b/compiler/testData/ir/irText/classes/kt43217.fir.txt @@ -0,0 +1,94 @@ +FILE fqName: fileName:/kt43217.kt + CLASS CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.A + CONSTRUCTOR visibility:public <> () returnType:.A [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' + PROPERTY name:b visibility:private modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:b type:.A.b. visibility:private [final] + EXPRESSION_BODY + BLOCK type=.A.b. origin=OBJECT_LITERAL + CLASS CLASS name: modality:FINAL visibility:local superTypes:[.DoubleExpression] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.A.b. + CONSTRUCTOR visibility:private <> () returnType:.A.b. [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in .DoubleExpression' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name: modality:FINAL visibility:local superTypes:[.DoubleExpression]' + FUN name:get visibility:public modality:FINAL <> ($this:.A.b.) returnType:kotlin.Double [operator] + overridden: + public abstract fun get (): T of .ObservableValue [operator] declared in .ObservableValue + $this: VALUE_PARAMETER name: type:.A.b. + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun get (): kotlin.Double [operator] declared in .A.b.' + CONST Double type=kotlin.Double value=0.0 + FUN FAKE_OVERRIDE name:isEqualTo visibility:public modality:OPEN <> ($this:.DoubleExpression, value:kotlin.Double) returnType:kotlin.Any [fake_override] + overridden: + public open fun isEqualTo (value: kotlin.Double): kotlin.Any declared in .DoubleExpression + $this: VALUE_PARAMETER name: type:.DoubleExpression + VALUE_PARAMETER name:value index:0 type:kotlin.Double + 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: 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: 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: type:kotlin.Any + CONSTRUCTOR_CALL 'private constructor () [primary] declared in .A.b.' type=.A.b. origin=OBJECT_LITERAL + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:private modality:FINAL <> ($this:.A) returnType:.A.b. + correspondingProperty: PROPERTY name:b visibility:private modality:FINAL [val] + $this: VALUE_PARAMETER name: type:.A + BLOCK_BODY + RETURN type=kotlin.Nothing from='private final fun (): .A.b. declared in .A' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:b type:.A.b. visibility:private [final]' type=.A.b. origin=null + receiver: GET_VAR ': .A declared in .A.' type=.A 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: 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: 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: type:kotlin.Any + CLASS CLASS name:C modality:FINAL visibility:public superTypes:[.DoubleExpression] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.C + CONSTRUCTOR visibility:public <> () returnType:.C [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in .DoubleExpression' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C modality:FINAL visibility:public superTypes:[.DoubleExpression]' + FUN name:get visibility:public modality:FINAL <> ($this:.C) returnType:kotlin.Double [operator] + overridden: + public abstract fun get (): T of .ObservableValue [operator] declared in .ObservableValue + $this: VALUE_PARAMETER name: type:.C + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun get (): kotlin.Double [operator] declared in .C' + CONST Double type=kotlin.Double value=0.0 + FUN FAKE_OVERRIDE name:isEqualTo visibility:public modality:OPEN <> ($this:.DoubleExpression, value:kotlin.Double) returnType:kotlin.Any [fake_override] + overridden: + public open fun isEqualTo (value: kotlin.Double): kotlin.Any declared in .DoubleExpression + $this: VALUE_PARAMETER name: type:.DoubleExpression + VALUE_PARAMETER name:value index:0 type:kotlin.Double + 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: 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: 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: type:kotlin.Any diff --git a/compiler/testData/ir/irText/classes/kt43217.kt b/compiler/testData/ir/irText/classes/kt43217.kt new file mode 100644 index 00000000000..a62b2547b78 --- /dev/null +++ b/compiler/testData/ir/irText/classes/kt43217.kt @@ -0,0 +1,46 @@ +// FILE: kt43217.kt +class A { + private val b = + object : DoubleExpression() { + override fun get(): Double { + return 0.0 + } + } +} + +class C : DoubleExpression() { + override fun get() = 0.0 +} + +// FILE: DoubleExpression.java +import org.jetbrains.annotations.NotNull; + +public abstract class DoubleExpression implements ObservableDouble { + @NotNull + @Override + public Object isEqualTo(double value) { + return null; + } +} + +// FILE: ObservableValue.java +import org.jetbrains.annotations.NotNull; + +public interface ObservableValue { + @NotNull + T get(); + + @NotNull + default Object isEqualTo(@NotNull T value) { + return null; + } +} + +// FILE: ObservableDouble.java +import org.jetbrains.annotations.NotNull; + +public interface ObservableDouble extends ObservableValue { + @NotNull + Object isEqualTo(double value); +} + diff --git a/compiler/testData/ir/irText/classes/kt43217.txt b/compiler/testData/ir/irText/classes/kt43217.txt new file mode 100644 index 00000000000..4bee53c9656 --- /dev/null +++ b/compiler/testData/ir/irText/classes/kt43217.txt @@ -0,0 +1,118 @@ +FILE fqName: fileName:/kt43217.kt + CLASS CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.A + CONSTRUCTOR visibility:public <> () returnType:.A [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' + PROPERTY name:b visibility:private modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:b type:.A.b. visibility:private [final] + EXPRESSION_BODY + BLOCK type=.A.b. origin=OBJECT_LITERAL + CLASS CLASS name: modality:FINAL visibility:local superTypes:[.DoubleExpression] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.A.b. + CONSTRUCTOR visibility:public <> () returnType:.A.b. [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in .DoubleExpression' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name: modality:FINAL visibility:local superTypes:[.DoubleExpression]' + FUN name:get visibility:public modality:OPEN <> ($this:.A.b.) returnType:kotlin.Double + overridden: + public abstract fun get (): @[EnhancedNullability] kotlin.Double [fake_override] declared in .DoubleExpression + $this: VALUE_PARAMETER name: type:.A.b. + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun get (): kotlin.Double declared in .A.b.' + CONST Double type=kotlin.Double value=0.0 + FUN FAKE_OVERRIDE name:isEqualTo visibility:public modality:OPEN <> ($this:.DoubleExpression, value:kotlin.Double) returnType:@[EnhancedNullability] kotlin.Any [fake_override] + annotations: + NotNull(value = ) + Override + overridden: + public open fun isEqualTo (value: kotlin.Double): @[EnhancedNullability] kotlin.Any declared in .DoubleExpression + $this: VALUE_PARAMETER name: type:.DoubleExpression + VALUE_PARAMETER name:value index:0 type:kotlin.Double + FUN FAKE_OVERRIDE name:isEqualTo visibility:public modality:OPEN <> ($this:.ObservableValue<@[FlexibleNullability] kotlin.Double?>, value:@[EnhancedNullability] kotlin.Double) returnType:@[EnhancedNullability] kotlin.Any [fake_override] + annotations: + NotNull(value = ) + overridden: + public open fun isEqualTo (value: @[EnhancedNullability] kotlin.Double): @[EnhancedNullability] kotlin.Any [fake_override] declared in .DoubleExpression + $this: VALUE_PARAMETER name: type:.ObservableValue<@[FlexibleNullability] kotlin.Double?> + VALUE_PARAMETER name:value index:0 type:@[EnhancedNullability] kotlin.Double + annotations: + NotNull(value = ) + 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 .DoubleExpression + $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 .DoubleExpression + $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 .DoubleExpression + $this: VALUE_PARAMETER name: type:kotlin.Any + CONSTRUCTOR_CALL 'public constructor () [primary] declared in .A.b.' type=.A.b. origin=OBJECT_LITERAL + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:private modality:FINAL <> ($this:.A) returnType:.A.b. + correspondingProperty: PROPERTY name:b visibility:private modality:FINAL [val] + $this: VALUE_PARAMETER name: type:.A + BLOCK_BODY + RETURN type=kotlin.Nothing from='private final fun (): .A.b. declared in .A' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:b type:.A.b. visibility:private [final]' type=.A.b. origin=null + receiver: GET_VAR ': .A declared in .A.' type=.A 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: 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: 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: type:kotlin.Any + CLASS CLASS name:C modality:FINAL visibility:public superTypes:[.DoubleExpression] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.C + CONSTRUCTOR visibility:public <> () returnType:.C [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in .DoubleExpression' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C modality:FINAL visibility:public superTypes:[.DoubleExpression]' + FUN name:get visibility:public modality:OPEN <> ($this:.C) returnType:kotlin.Double + overridden: + public abstract fun get (): @[EnhancedNullability] kotlin.Double [fake_override] declared in .DoubleExpression + $this: VALUE_PARAMETER name: type:.C + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun get (): kotlin.Double declared in .C' + CONST Double type=kotlin.Double value=0.0 + FUN FAKE_OVERRIDE name:isEqualTo visibility:public modality:OPEN <> ($this:.DoubleExpression, value:kotlin.Double) returnType:@[EnhancedNullability] kotlin.Any [fake_override] + annotations: + NotNull(value = ) + Override + overridden: + public open fun isEqualTo (value: kotlin.Double): @[EnhancedNullability] kotlin.Any declared in .DoubleExpression + $this: VALUE_PARAMETER name: type:.DoubleExpression + VALUE_PARAMETER name:value index:0 type:kotlin.Double + FUN FAKE_OVERRIDE name:isEqualTo visibility:public modality:OPEN <> ($this:.ObservableValue<@[FlexibleNullability] kotlin.Double?>, value:@[EnhancedNullability] kotlin.Double) returnType:@[EnhancedNullability] kotlin.Any [fake_override] + annotations: + NotNull(value = ) + overridden: + public open fun isEqualTo (value: @[EnhancedNullability] kotlin.Double): @[EnhancedNullability] kotlin.Any [fake_override] declared in .DoubleExpression + $this: VALUE_PARAMETER name: type:.ObservableValue<@[FlexibleNullability] kotlin.Double?> + VALUE_PARAMETER name:value index:0 type:@[EnhancedNullability] kotlin.Double + annotations: + NotNull(value = ) + 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 .DoubleExpression + $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 .DoubleExpression + $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 .DoubleExpression + $this: VALUE_PARAMETER name: type:kotlin.Any diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java index 1653ee99af9..84247993e99 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java @@ -17369,6 +17369,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/javaInterop/genericSamSmartcast.kt"); } + @TestMetadata("kt43217.kt") + public void testKt43217() throws Exception { + runTest("compiler/testData/codegen/box/javaInterop/kt43217.kt"); + } + @TestMetadata("lambdaInstanceOf.kt") public void testLambdaInstanceOf() throws Exception { runTest("compiler/testData/codegen/box/javaInterop/lambdaInstanceOf.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeListingTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeListingTestGenerated.java index 9514486b157..50d8609ccfe 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeListingTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeListingTestGenerated.java @@ -109,6 +109,11 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest { runTest("compiler/testData/codegen/bytecodeListing/kt42879.kt"); } + @TestMetadata("kt43217.kt") + public void testKt43217() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/kt43217.kt"); + } + @TestMetadata("localFunctionInInitBlock.kt") public void testLocalFunctionInInitBlock() throws Exception { runTest("compiler/testData/codegen/bytecodeListing/localFunctionInInitBlock.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index 08d783db24b..e75339efc73 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -17369,6 +17369,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/javaInterop/genericSamSmartcast.kt"); } + @TestMetadata("kt43217.kt") + public void testKt43217() throws Exception { + runTest("compiler/testData/codegen/box/javaInterop/kt43217.kt"); + } + @TestMetadata("lambdaInstanceOf.kt") public void testLambdaInstanceOf() throws Exception { runTest("compiler/testData/codegen/box/javaInterop/lambdaInstanceOf.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java index 0eeba7dda85..3eb4b7ad760 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java @@ -15969,6 +15969,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/javaInterop/genericSamSmartcast.kt"); } + @TestMetadata("kt43217.kt") + public void testKt43217() throws Exception { + runTest("compiler/testData/codegen/box/javaInterop/kt43217.kt"); + } + @TestMetadata("lambdaInstanceOf.kt") public void testLambdaInstanceOf() throws Exception { runTest("compiler/testData/codegen/box/javaInterop/lambdaInstanceOf.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBytecodeListingTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBytecodeListingTestGenerated.java index 13127f578f9..d6cdbbd403a 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBytecodeListingTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBytecodeListingTestGenerated.java @@ -109,6 +109,11 @@ public class IrBytecodeListingTestGenerated extends AbstractIrBytecodeListingTes runTest("compiler/testData/codegen/bytecodeListing/kt42879.kt"); } + @TestMetadata("kt43217.kt") + public void testKt43217() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/kt43217.kt"); + } + @TestMetadata("localFunctionInInitBlock.kt") public void testLocalFunctionInInitBlock() throws Exception { runTest("compiler/testData/codegen/bytecodeListing/localFunctionInInitBlock.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java b/compiler/tests/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java index 7123dd8f3ee..88d73c7f06d 100644 --- a/compiler/tests/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java @@ -195,6 +195,11 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase { runTest("compiler/testData/ir/irText/classes/kt31649.kt"); } + @TestMetadata("kt43217.kt") + public void testKt43217() throws Exception { + runTest("compiler/testData/ir/irText/classes/kt43217.kt"); + } + @TestMetadata("lambdaInDataClassDefaultParameter.kt") public void testLambdaInDataClassDefaultParameter() throws Exception { runTest("compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.kt");