diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/SignatureCollectingClassBuilderFactory.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/SignatureCollectingClassBuilderFactory.kt index a8174c54e91..8c9f98f9838 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/SignatureCollectingClassBuilderFactory.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/SignatureCollectingClassBuilderFactory.kt @@ -17,13 +17,14 @@ package org.jetbrains.kotlin.codegen import com.intellij.psi.PsiElement -import org.jetbrains.org.objectweb.asm.FieldVisitor -import org.jetbrains.org.objectweb.asm.MethodVisitor +import com.intellij.util.containers.LinkedMultiMap import com.intellij.util.containers.MultiMap import org.jetbrains.kotlin.resolve.jvm.diagnostics.ConflictingJvmDeclarationsData -import org.jetbrains.kotlin.resolve.jvm.diagnostics.MemberKind import org.jetbrains.kotlin.resolve.jvm.diagnostics.JvmDeclarationOrigin +import org.jetbrains.kotlin.resolve.jvm.diagnostics.MemberKind import org.jetbrains.kotlin.resolve.jvm.diagnostics.RawSignature +import org.jetbrains.org.objectweb.asm.FieldVisitor +import org.jetbrains.org.objectweb.asm.MethodVisitor public abstract class SignatureCollectingClassBuilderFactory( delegate: ClassBuilderFactory @@ -47,7 +48,7 @@ public abstract class SignatureCollectingClassBuilderFactory( private var classInternalName: String? = null - private val signatures = MultiMap() + private val signatures = LinkedMultiMap() override fun defineClass(origin: PsiElement?, version: Int, access: Int, name: String, signature: String?, superName: String, interfaces: Array) { classInternalName = name diff --git a/compiler/testData/cli/jvm/syntheticAccessorForPropertiesSignatureClash.out b/compiler/testData/cli/jvm/syntheticAccessorForPropertiesSignatureClash.out index 984e7c203fa..1bcfee535a2 100644 --- a/compiler/testData/cli/jvm/syntheticAccessorForPropertiesSignatureClash.out +++ b/compiler/testData/cli/jvm/syntheticAccessorForPropertiesSignatureClash.out @@ -1,8 +1,3 @@ -compiler/testData/cli/jvm/syntheticAccessorForPropertiesSignatureClash.kt:1:7: error: platform declaration clash: The following declarations have the same JVM signature (access$getFoo$cp()I): - fun (): kotlin.Int - fun `access$getFoo$cp`(): kotlin.Int -class A { - ^ compiler/testData/cli/jvm/syntheticAccessorForPropertiesSignatureClash.kt:1:7: error: platform declaration clash: The following declarations have the same JVM signature (access$getFoo$p(LA;)I): fun (): kotlin.Int fun `access$getFoo$p`(a: A): kotlin.Int @@ -13,6 +8,11 @@ compiler/testData/cli/jvm/syntheticAccessorForPropertiesSignatureClash.kt:1:7: e fun `access$setFoo$p`(a: A, d: kotlin.Int): kotlin.Unit class A { ^ +compiler/testData/cli/jvm/syntheticAccessorForPropertiesSignatureClash.kt:1:7: error: platform declaration clash: The following declarations have the same JVM signature (access$getFoo$cp()I): + fun (): kotlin.Int + fun `access$getFoo$cp`(): kotlin.Int +class A { + ^ compiler/testData/cli/jvm/syntheticAccessorForPropertiesSignatureClash.kt:1:7: error: platform declaration clash: The following declarations have the same JVM signature (access$setFoo$cp(I)V): fun (: kotlin.Int): kotlin.Unit fun `access$setFoo$cp`(d: kotlin.Int): kotlin.Unit diff --git a/compiler/testData/cli/jvm/syntheticAccessorPropertyAndFunSignatureClash.out b/compiler/testData/cli/jvm/syntheticAccessorPropertyAndFunSignatureClash.out index d1250bfcad2..9437ba8777c 100644 --- a/compiler/testData/cli/jvm/syntheticAccessorPropertyAndFunSignatureClash.out +++ b/compiler/testData/cli/jvm/syntheticAccessorPropertyAndFunSignatureClash.out @@ -1,21 +1,21 @@ +compiler/testData/cli/jvm/syntheticAccessorPropertyAndFunSignatureClash.kt:1:7: error: platform declaration clash: The following declarations have the same JVM signature (access$getFoo$p(LA;)I): + fun (): kotlin.Int + fun `access$getFoo$p`(a: A): kotlin.Int +class A { + ^ compiler/testData/cli/jvm/syntheticAccessorPropertyAndFunSignatureClash.kt:1:7: error: platform declaration clash: The following declarations have the same JVM signature (access$setFoo$p(LA;I)V): fun (: kotlin.Int): kotlin.Unit fun `access$setFoo$p`(a: A, d: kotlin.Int): kotlin.Unit class A { ^ -compiler/testData/cli/jvm/syntheticAccessorPropertyAndFunSignatureClash.kt:1:7: error: platform declaration clash: The following declarations have the same JVM signature (access$setFoo(LA;I)V): - fun `access$setFoo`(a: A, d: kotlin.Int): kotlin.Unit - fun setFoo(i: kotlin.Int): kotlin.Unit -class A { - ^ compiler/testData/cli/jvm/syntheticAccessorPropertyAndFunSignatureClash.kt:1:7: error: platform declaration clash: The following declarations have the same JVM signature (access$getFoo(LA;)I): fun `access$getFoo`(a: A): kotlin.Int fun getFoo(): kotlin.Int class A { ^ -compiler/testData/cli/jvm/syntheticAccessorPropertyAndFunSignatureClash.kt:1:7: error: platform declaration clash: The following declarations have the same JVM signature (access$getFoo$p(LA;)I): - fun (): kotlin.Int - fun `access$getFoo$p`(a: A): kotlin.Int +compiler/testData/cli/jvm/syntheticAccessorPropertyAndFunSignatureClash.kt:1:7: error: platform declaration clash: The following declarations have the same JVM signature (access$setFoo(LA;I)V): + fun `access$setFoo`(a: A, d: kotlin.Int): kotlin.Unit + fun setFoo(i: kotlin.Int): kotlin.Unit class A { ^ compiler/testData/cli/jvm/syntheticAccessorPropertyAndFunSignatureClash.kt:5:5: error: platform declaration clash: The following declarations have the same JVM signature (access$getFoo$p(LA;)I):