minor: rename FirScript.statements do declarations...

to simplify the following commit that actually convert the types
and wrap statements into blocks.
This commit is contained in:
Ilya Chernikov
2023-12-08 10:13:59 +01:00
committed by Space Team
parent a29a7e6307
commit c9aee5bf09
26 changed files with 52 additions and 53 deletions
@@ -137,10 +137,10 @@ class FirScriptConfiguratorExtensionImpl(
}
configuration[ScriptCompilationConfiguration.resultField]?.takeIf { it.isNotBlank() }?.let { resultFieldName ->
val lastExpression = statements.lastOrNull()
val lastExpression = declarations.lastOrNull()
if (lastExpression != null && lastExpression is FirExpression) {
statements.removeAt(statements.size - 1)
statements.add(
declarations.removeAt(declarations.size - 1)
declarations.add(
@OptIn(UnresolvedExpressionTypeAccess::class)
buildProperty {
this.name = Name.identifier(resultFieldName)