From 18524ea8ec824d4eea42168ce5d1b03fc2df8c52 Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Mon, 19 Oct 2015 22:42:15 +0300 Subject: [PATCH] Proper semantics for former data classes --- .../kotlin/annotation/AnnotationProcessorWrapper.kt | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/libraries/tools/kotlin-annotation-processing/src/main/kotlin/org/jetbrains/kotlin/annotation/AnnotationProcessorWrapper.kt b/libraries/tools/kotlin-annotation-processing/src/main/kotlin/org/jetbrains/kotlin/annotation/AnnotationProcessorWrapper.kt index e2d1a30606a..2c90fc6da21 100644 --- a/libraries/tools/kotlin-annotation-processing/src/main/kotlin/org/jetbrains/kotlin/annotation/AnnotationProcessorWrapper.kt +++ b/libraries/tools/kotlin-annotation-processing/src/main/kotlin/org/jetbrains/kotlin/annotation/AnnotationProcessorWrapper.kt @@ -34,21 +34,14 @@ public class AnnotationProcessorStub : AbstractProcessor() { abstract class AnnotatedElementDescriptor(public val classFqName: String) -class AnnotatedClassDescriptor(classFqName: String) : AnnotatedElementDescriptor(classFqName) { - override fun equals(other: Any?) = other is AnnotatedClassDescriptor - - override fun hashCode() = 0 -} +class AnnotatedClassDescriptor(classFqName: String) : AnnotatedElementDescriptor(classFqName) class AnnotatedMethodDescriptor(classFqName: String, public val methodName: String) : AnnotatedElementDescriptor(classFqName) { override fun equals(other: Any?) = other is AnnotatedMethodDescriptor && methodName == other.methodName override fun hashCode() = methodName.hashCode() } -class AnnotatedConstructorDescriptor(classFqName: String) : AnnotatedElementDescriptor(classFqName) { - override fun equals(other: Any?) = other is AnnotatedConstructorDescriptor +class AnnotatedConstructorDescriptor(classFqName: String) : AnnotatedElementDescriptor(classFqName) - override fun hashCode() = 0 -} class AnnotatedFieldDescriptor(classFqName: String, public val fieldName: String) : AnnotatedElementDescriptor(classFqName) { override fun equals(other: Any?) = other is AnnotatedFieldDescriptor && fieldName == other.fieldName