Fix equality for the KtFileScriptSource

This commit is contained in:
Ilya Chernikov
2019-10-29 15:33:57 +01:00
parent 26255f8501
commit 9aaf08de08
@@ -79,9 +79,7 @@ open class KtFileScriptSource(val ktFile: KtFile, preloadedText: String? = null)
override val name: String? get() = ktFile.name
override fun equals(other: Any?): Boolean =
this === other
|| (other as? KtFileScriptSource)?.let { ktFile == it.ktFile } == true
|| super.equals(other)
this === other || (other as? KtFileScriptSource)?.let { ktFile == it.ktFile } == true
override fun hashCode(): Int = ktFile.hashCode()
}