[FIR] add replaceStatements to FirScript

It is required to implement StateKeeper for scripts
statements should be MutableOrEmptyList to avoid CME

^KT-60728
^KT-60519
This commit is contained in:
Dmitrii Gridin
2023-07-25 20:36:03 +02:00
committed by Space Team
parent a2dc6ca8f2
commit 2f57916869
4 changed files with 9 additions and 3 deletions
@@ -489,7 +489,7 @@ object NodeConfigurator : AbstractFieldConfigurator<FirTreeBuilder>(FirTreeBuild
script.configure {
+name
+fieldList(statement).withTransform()
+fieldList(statement, withReplace = true, useMutableOrEmpty = true).withTransform()
+symbol("FirScriptSymbol")
+fieldList("parameters", variable, withReplace = false)
+fieldList(contextReceiver, useMutableOrEmpty = true)