Change evaluation function for arrayOf
For now it will get only elements variable from stack instead of all
This commit is contained in:
committed by
TeamCityServer
parent
4010eb11bd
commit
7ecf4b17b6
+2
-1
@@ -42,7 +42,8 @@ internal object ArrayOf : IntrinsicBase() {
|
||||
}
|
||||
|
||||
override fun evaluate(irFunction: IrFunction, stack: Stack, interpret: IrElement.() -> ExecutionResult): ExecutionResult {
|
||||
val array = irFunction.getArgsForMethodInvocation(stack.getAll()).toTypedArray()
|
||||
val elementsVariable = irFunction.valueParameters.single().symbol
|
||||
val array = irFunction.getArgsForMethodInvocation(listOf(stack.getVariable(elementsVariable))).toTypedArray()
|
||||
val typeArguments = irFunction.typeParameters.map { stack.getVariable(it.symbol) }
|
||||
stack.pushReturnValue(array.toState(irFunction.returnType).apply { addTypeArguments(typeArguments) })
|
||||
return Next
|
||||
|
||||
Reference in New Issue
Block a user