Don't assert element validity in diagnostic code (EA-92848)
This commit is contained in:
@@ -324,7 +324,7 @@ val PsiElement.textRangeWithoutComments: TextRange
|
||||
// ---------------------------------- Debug/logging ----------------------------------------------------------------------------------------
|
||||
|
||||
fun PsiElement.getElementTextWithContext(): String {
|
||||
assert(isValid) { "Invalid element $this" }
|
||||
if (!isValid) return "<invalid element $this>"
|
||||
|
||||
if (this is PsiFile) {
|
||||
return containingFile.text
|
||||
|
||||
Reference in New Issue
Block a user