K2 Scripting: wrap script statements into blocks
(reuse anonymous initializers as block wrappers) so the top-level script elements are all declarations now. Rename the property accordingly ( together with the previous commit). It makes script more similar to the class and thus simplify e.g. control flow analysis and resolve code.
This commit is contained in:
committed by
Space Team
parent
c9aee5bf09
commit
eeb723eb01
+1
-1
@@ -27,7 +27,7 @@ internal class KtFirScriptParameterSymbolPointer(
|
||||
scriptPointer.restoreSymbol()?.firSymbol?.fir as? FirScript
|
||||
} ?: return null
|
||||
|
||||
val parameter = script.parameters.find { it.name == parameterName } as? FirProperty ?: return null
|
||||
val parameter = script.parameters.find { it.name == parameterName } ?: return null
|
||||
return analysisSession.firSymbolBuilder.variableLikeBuilder.buildLocalVariableSymbol(parameter.symbol)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user