Restore referential equality for AnnotatedClassDescriptor and AnnotatedConstructorDescriptor.

This commit is contained in:
Ilya Gorbunov
2015-10-19 22:46:16 +03:00
parent abf4030ef9
commit 59cd1cd14a
@@ -34,13 +34,18 @@ public class AnnotationProcessorStub : AbstractProcessor() {
abstract class AnnotatedElementDescriptor(public val classFqName: String)
class AnnotatedClassDescriptor(classFqName: String) : AnnotatedElementDescriptor(classFqName)
class AnnotatedClassDescriptor(classFqName: String) : AnnotatedElementDescriptor(classFqName) {
// use referential equality
}
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)
class AnnotatedConstructorDescriptor(classFqName: String) : AnnotatedElementDescriptor(classFqName) {
// use referential equality
}
class AnnotatedFieldDescriptor(classFqName: String, public val fieldName: String) : AnnotatedElementDescriptor(classFqName) {
override fun equals(other: Any?) = other is AnnotatedFieldDescriptor && fieldName == other.fieldName