[AA FIR] KtFirReferenceShortener: process only statements in scripts

We shouldn't process other elements (like parameters/receivers) because
we can't modify them anyway. This will help to avoid exceptions like
```
Attempt to load text for binary file which doesn't have a decompiler plugged in
```
in tests

^KT-61431
This commit is contained in:
Dmitrii Gridin
2023-08-24 14:27:23 +02:00
committed by Space Team
parent bef5f89f61
commit 932c2a6e15
@@ -382,6 +382,12 @@ private class ElementsToShortenCollector(
}
}
override fun visitScript(script: FirScript) {
script.statements.forEach {
it.accept(this)
}
}
override fun visitElement(element: FirElement) {
element.acceptChildren(this)
}