KT-351 Distinguish statement and expression positions

This commit is contained in:
svtk
2011-12-13 19:43:20 +04:00
parent 182009ab61
commit a41d33a56c
19 changed files with 318 additions and 65 deletions
@@ -326,9 +326,9 @@ public class JetTypeCheckerTest extends JetLiteFixture {
}
public void testLoops() throws Exception {
assertType("while (1) {1}", "Unit");
assertType("do {1} while(1)", "Unit");
assertType("for (i in 1) {1}", "Unit");
assertType("{ while (1) {1} }", "fun(): Unit");
assertType("{ do {1} while(1) }", "fun(): Unit");
assertType("{ for (i in 1) {1} }", "fun(): Unit");
}
public void testFunctionLiterals() throws Exception {