Merge remote branch 'origin/master'
This commit is contained in:
@@ -1307,6 +1307,9 @@ public class ExpressionCodegen extends JetVisitor<StackValue, StackValue> {
|
|||||||
else if(type.getSort() == Type.DOUBLE) {
|
else if(type.getSort() == Type.DOUBLE) {
|
||||||
v.aconst(0d);
|
v.aconst(0d);
|
||||||
}
|
}
|
||||||
|
else if(type.getSort() == Type.LONG) {
|
||||||
|
v.aconst(0l);
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
v.iconst(0);
|
v.iconst(0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -284,4 +284,21 @@ public class PrimitiveTypesTest extends CodegenTestCase {
|
|||||||
public void testKt518 () throws Exception {
|
public void testKt518 () throws Exception {
|
||||||
blackBoxFile("regressions/kt518.jet");
|
blackBoxFile("regressions/kt518.jet");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testKt665() throws Exception {
|
||||||
|
loadText("fun f(x: Long, zzz: Long = 1): Long\n" +
|
||||||
|
"{\n" +
|
||||||
|
" return if (x <= 1) zzz\n" +
|
||||||
|
" else f(x-1, x*zzz)\n" +
|
||||||
|
"}\n" +
|
||||||
|
"\n" +
|
||||||
|
"fun box() : String\n" +
|
||||||
|
"{\n" +
|
||||||
|
" val six: Long = 6;\n" +
|
||||||
|
" System.out?.println(f(six))\n" +
|
||||||
|
" return \"OK\"" +
|
||||||
|
"}");
|
||||||
|
System.out.println(generateToText());
|
||||||
|
blackBox();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user