|
@@ -884,11 +884,17 @@ public class JavaExpressionVisitor implements ExpressionVisitor<Void>, JavaNativ
|
884
|
884
|
} else {
|
885
|
885
|
argument.accept(this);
|
886
|
886
|
javaWriter.dup();
|
887
|
|
- int tmp = javaWriter.local(Type.getType("zsynthetic/IntRange"));
|
|
887
|
+ final String owner;
|
|
888
|
+ if (argument.type.type instanceof RangeTypeID) {
|
|
889
|
+ owner = context.getInternalName(argument.type);
|
|
890
|
+ } else {
|
|
891
|
+ owner = "zsynthetic/IntRange";
|
|
892
|
+ }
|
|
893
|
+ int tmp = javaWriter.local(Type.getType(owner));
|
888
|
894
|
javaWriter.storeInt(tmp);
|
889
|
|
- javaWriter.getField("zsynthetic/IntRange", "from", "I");
|
|
895
|
+ javaWriter.getField(owner, "from", "I");
|
890
|
896
|
javaWriter.loadInt(tmp);
|
891
|
|
- javaWriter.getField("zsynthetic/IntRange", "to", "I");
|
|
897
|
+ javaWriter.getField(owner, "to", "I");
|
892
|
898
|
}
|
893
|
899
|
javaWriter.invokeVirtual(STRING_SUBSTRING);
|
894
|
900
|
break;
|
|
@@ -1007,11 +1013,17 @@ public class JavaExpressionVisitor implements ExpressionVisitor<Void>, JavaNativ
|
1007
|
1013
|
} else {
|
1008
|
1014
|
argument.accept(this);
|
1009
|
1015
|
javaWriter.dup();
|
1010
|
|
- int tmp = javaWriter.local(Type.getType("zsynthetic/IntRange"));
|
|
1016
|
+ final String owner;
|
|
1017
|
+ if (argument.type.type instanceof RangeTypeID) {
|
|
1018
|
+ owner = context.getInternalName(argument.type);
|
|
1019
|
+ } else {
|
|
1020
|
+ owner = "zsynthetic/IntRange";
|
|
1021
|
+ }
|
|
1022
|
+ int tmp = javaWriter.local(Type.getType(owner));
|
1011
|
1023
|
javaWriter.storeInt(tmp);
|
1012
|
|
- javaWriter.getField("zsynthetic/IntRange", "from", "I");
|
|
1024
|
+ javaWriter.getField(owner, "from", "I");
|
1013
|
1025
|
javaWriter.loadInt(tmp);
|
1014
|
|
- javaWriter.getField("zsynthetic/IntRange", "to", "I");
|
|
1026
|
+ javaWriter.getField(owner, "to", "I");
|
1015
|
1027
|
}
|
1016
|
1028
|
|
1017
|
1029
|
if (type.elementType.type instanceof BasicTypeID) {
|