Serialize/deserialize annotations on type parameters
Original commit: 25b40455ad
This commit is contained in:
@@ -308,6 +308,12 @@ open class ProtoCompareGenerated(public val oldNameResolver: NameResolver, publi
|
||||
|
||||
if (!checkEqualsTypeParameterUpperBoundId(old, new)) return false
|
||||
|
||||
if (old.getExtensionCount(JvmProtoBuf.typeParameterAnnotation) != new.getExtensionCount(JvmProtoBuf.typeParameterAnnotation)) return false
|
||||
|
||||
for(i in 0..old.getExtensionCount(JvmProtoBuf.typeParameterAnnotation) - 1) {
|
||||
if (!checkEquals(old.getExtension(JvmProtoBuf.typeParameterAnnotation, i), new.getExtension(JvmProtoBuf.typeParameterAnnotation, i))) return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -995,6 +1001,10 @@ public fun ProtoBuf.TypeParameter.hashCode(stringIndexes: (Int) -> Int, fqNameIn
|
||||
hashCode = 31 * hashCode + getUpperBoundId(i)
|
||||
}
|
||||
|
||||
for(i in 0..getExtensionCount(JvmProtoBuf.typeParameterAnnotation) - 1) {
|
||||
hashCode = 31 * hashCode + getExtension(JvmProtoBuf.typeParameterAnnotation, i).hashCode(stringIndexes, fqNameIndexes)
|
||||
}
|
||||
|
||||
return hashCode
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user