frontend bugs fixed:
fun f(): Int = "s" //was ok
fun g(): Int { if (1 < 2) {} else {} }//was ok
fun h(): Int { val a = 1 } //was ok
This commit is contained in:
@@ -94,7 +94,7 @@ public class NamespaceGenTest extends CodegenTestCase {
|
||||
}
|
||||
|
||||
public void testBoxedInt() throws Exception {
|
||||
loadText("fun foo(a: Int?): Int = if (a != null) a else 239");
|
||||
loadText("fun foo(a: Int?) = if (a != null) a else 239");
|
||||
final Method main = generateFunction();
|
||||
assertEquals(610, main.invoke(null, 610));
|
||||
assertEquals(239, main.invoke(null, new Object[]{null}));
|
||||
|
||||
Reference in New Issue
Block a user