[Commonizer] Narrow CirClassifierId subtype cast in AnnotationsCommonizer

This commit is contained in:
Dmitriy Dolovov
2020-07-08 16:18:56 +07:00
parent 7a283c64cb
commit 5e383e9d71
@@ -39,7 +39,7 @@ class AnnotationsCommonizer : AbstractStandardCommonizer<List<CirAnnotation>, Li
override fun doCommonizeWith(next: List<CirAnnotation>): Boolean {
val nextDeprecatedAnnotation = next.firstOrNull { annotation ->
(annotation.type.classifierId as? CirClassifierId.ClassOrTypeAlias)?.classId == DEPRECATED_ANNOTATION_CID
(annotation.type.classifierId as? CirClassifierId.Class)?.classId == DEPRECATED_ANNOTATION_CID
} ?: return true
val deprecatedAnnotationCommonizer = deprecatedAnnotationCommonizer