Fix for RangeTo intrinsic for the case of LongRange

This commit is contained in:
Andrey Breslav
2012-08-31 12:28:48 +04:00
parent e8e5d3a87d
commit f1c4ab7188
4 changed files with 103 additions and 1 deletions
@@ -50,7 +50,7 @@ public class RangeTo implements IntrinsicMethod {
if (arguments.size() == 1) {
final Type leftType = receiver.type;
final Type rightType = codegen.expressionType(arguments.get(0));
receiver.put(Type.INT_TYPE, v);
receiver.put(leftType, v);
codegen.gen(arguments.get(0), rightType);
v.invokestatic("jet/runtime/Ranges", "rangeTo",
"(" + receiver.type.getDescriptor() + leftType.getDescriptor() + ")" + expectedType.getDescriptor());