Added special type constructor for function/ extension function

that stores an information about declared argument types
This commit is contained in:
Svetlana Isakova
2015-05-21 22:54:56 +03:00
committed by Alexander Udalov
parent 79ee91c048
commit d9568ef88c
5 changed files with 132 additions and 89 deletions
@@ -382,8 +382,8 @@ public class JetTypeCheckerTest extends JetLiteFixture {
public void testBlocks() throws Exception {
assertType("if (1) {val a = 1; a} else {null}", "Int?");
assertType("if (1) {() -> val a = 1; a} else {() -> null}", "Function0<Int?>");
assertType("if (1) {() -> val a = 1; a; var b : Boolean; b} else null", "Function0<Boolean>?");
assertType("if (1) {() -> val a = 1; a; var b = a; b} else null", "Function0<Int>?");
assertType("if (1) (fun (): Boolean { val a = 1; a; var b : Boolean; return b }) else null", "Function0<Boolean>?");
assertType("if (1) (fun (): Int { val a = 1; a; var b = a; return b }) else null", "Function0<Int>?");
}
public void testNew() throws Exception {