Added special type constructor for function/ extension function
that stores an information about declared argument types
This commit is contained in:
committed by
Alexander Udalov
parent
79ee91c048
commit
d9568ef88c
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user