K2 Scripting, IR: non-class based scripts support in IR

This commit is contained in:
Ilya Chernikov
2022-11-17 15:26:15 +01:00
committed by Space Team
parent cc9a7480a2
commit 4af32b8d36
8 changed files with 71 additions and 23 deletions
@@ -45,7 +45,7 @@ class ScriptRemoveReceiverLowering(val context: CommonBackendContext) : FileLowe
}
override fun visitGetValue(expression: IrGetValue): IrExpression {
return if (expression.symbol === script.thisReceiver.symbol) expression.nullConst()
return if (expression.symbol === script.thisReceiver?.symbol) expression.nullConst()
else expression
}