Replace unchecked 'is' on local class with unchecked 'as'

It became unchecked after latest changes (see parent commit)
This commit is contained in:
Denis Zharkov
2015-11-18 14:30:29 +03:00
parent 3fd35636ad
commit 48b89a5db7
@@ -166,8 +166,10 @@ fun<TDescriptor: DeclarationDescriptor?> MutableCollection<LookupElement>.addLoo
lookupElementFactory: (TDescriptor) -> Collection<LookupElement>
) {
class ItemData(val descriptor: TDescriptor, val itemOptions: ItemOptions) {
@Suppress("UNCHECKED_CAST")
override fun equals(other: Any?)
= other is ItemData && descriptorsEqualWithSubstitution(this.descriptor, other.descriptor) && itemOptions == other.itemOptions
= descriptorsEqualWithSubstitution(this.descriptor, (other as? ItemData)?.descriptor) && itemOptions ==
(other as? ItemData)?.itemOptions
override fun hashCode() = if (this.descriptor != null) this.descriptor.getOriginal().hashCode() else 0
}