diff --git a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/FirSourceElement.kt b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/FirSourceElement.kt index a9d38bf63f0..d778724cba6 100644 --- a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/FirSourceElement.kt +++ b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/FirSourceElement.kt @@ -197,6 +197,12 @@ sealed class FirSourceElement { abstract val kind: FirSourceElementKind abstract val lighterASTNode: LighterASTNode abstract val treeStructure: FlyweightCapableTreeStructure + + /** Implementation must compute the hashcode from the source element. */ + abstract override fun hashCode(): Int + + /** Elements of the same source should be considered equal. */ + abstract override fun equals(other: Any?): Boolean } // NB: in certain situations, psi.node could be null