FIR IDE: precalculate DuplicatedFirSourceElementsException error message
It may be called from non-read action
This commit is contained in:
+4
-6
@@ -152,13 +152,11 @@ internal class FirModuleResolveStateImpl(override val sessionProvider: FirProjec
|
|||||||
}
|
}
|
||||||
|
|
||||||
class DuplicatedFirSourceElementsException(
|
class DuplicatedFirSourceElementsException(
|
||||||
private val existingFir: FirElement,
|
existingFir: FirElement,
|
||||||
private val newFir: FirElement,
|
newFir: FirElement,
|
||||||
private val psi: KtElement
|
psi: KtElement
|
||||||
) : IllegalStateException() {
|
) : IllegalStateException() {
|
||||||
override val message: String?
|
override val message: String? = """|The PSI element should be used only once as a real PSI source of FirElement,
|
||||||
get() =
|
|
||||||
"""|The PSI element should be used only once as a real PSI source of FirElement,
|
|
||||||
|the elements ${if (existingFir.source === newFir.source) "HAVE" else "DON'T HAVE"} the same instances of source elements
|
|the elements ${if (existingFir.source === newFir.source) "HAVE" else "DON'T HAVE"} the same instances of source elements
|
||||||
|
|
|
|
||||||
|existing FIR element is $existingFir with text:
|
|existing FIR element is $existingFir with text:
|
||||||
|
|||||||
Reference in New Issue
Block a user