Browse Source

Box Map keys when indexGetting

kindlich 4 years ago
parent
commit
66ec3e003b
No known key found for this signature in database

+ 2
- 1
JavaBytecodeCompiler/src/main/java/org/openzen/zenscript/javabytecode/compiler/JavaExpressionVisitor.java View File

@@ -929,9 +929,10 @@ public class JavaExpressionVisitor implements ExpressionVisitor<Void>, JavaNativ
929 929
 				break;
930 930
 			case ASSOC_INDEXGET:
931 931
 			case ASSOC_GETORDEFAULT: {
932
+				AssocTypeID type = (AssocTypeID) expression.target.type.type;
933
+				type.keyType.type.accept(type.keyType, boxingTypeVisitor);
932 934
 				javaWriter.invokeInterface(MAP_GET);
933 935
 
934
-				AssocTypeID type = (AssocTypeID) expression.target.type.type;
935 936
 				type.valueType.type.accept(type.valueType, unboxingTypeVisitor);
936 937
 				break;
937 938
 			}

Loading…
Cancel
Save