KT-12983 java.lang.VerifyError: Bad type on operand stack in arraylength
Use proper receiver value type.
This commit is contained in:
@@ -1197,7 +1197,8 @@ public class ExpressionCodegen extends KtVisitor<StackValue, StackValue> impleme
|
||||
loopParameter().store(StackValue.constant(0, asmElementType), v);
|
||||
|
||||
StackValue receiver = generateReceiverValue(receiverValue, false);
|
||||
receiver.put(receiver.type, v);
|
||||
Type receiverType = asmType(receiverValue.getType());
|
||||
receiver.put(receiverType, v); // NB receiverType is a collection or an array
|
||||
getReceiverSizeAsInt();
|
||||
v.iconst(1);
|
||||
v.sub(Type.INT_TYPE);
|
||||
|
||||
Reference in New Issue
Block a user