FIR IDE: add debug error message when not possible to find fir declarartion by psi
This commit is contained in:
+2
-1
@@ -91,7 +91,8 @@ private fun KtDeclaration.findSourceNonLocalFirDeclarationByProvider(
|
|||||||
firFile.declarations
|
firFile.declarations
|
||||||
}
|
}
|
||||||
val original = originalDeclaration
|
val original = originalDeclaration
|
||||||
declarations?.first { it.psi === this || it.psi == original }
|
declarations?.firstOrNull { it.psi == this || it.psi == original }
|
||||||
|
?: error("Cannot find corresponding fir for\n${this.getElementTextInContext()}")
|
||||||
}
|
}
|
||||||
this is KtConstructor<*> -> {
|
this is KtConstructor<*> -> {
|
||||||
val containingClass = containingClassOrObject
|
val containingClass = containingClassOrObject
|
||||||
|
|||||||
Reference in New Issue
Block a user