failing test (infers boolean return type for some reason)

This commit is contained in:
Dmitry Jemerov
2011-04-14 17:02:32 +02:00
parent 1d000d36c6
commit 4d92f75133
3 changed files with 28 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
fun main() {
var bottles = 99;
while(bottles > 0) {
System.out?.println("bottles of beer on the wall");
bottles--;
}
}
+7
View File
@@ -0,0 +1,7 @@
fun main() {
var bottles = 99;
while(bottles > 0) {
System.out?.println("bottles of beer on the wall");
bottles -= 1;
}
}
@@ -478,6 +478,20 @@ public class NamespaceGenTest extends LightCodeInsightFixtureTestCase {
assertTrue(hadException);
}
public void _testBottlesNeedToDistinguishExpressionsStatements() throws Exception {
loadFile("bottles.jet");
System.out.println(generateToText());
final Method main = generateFunction();
main.invoke(null); // ensure no exception
}
public void testBottles2() throws Exception {
loadFile("bottles2.jet");
System.out.println(generateToText());
final Method main = generateFunction();
main.invoke(null); // ensure no exception
}
private void binOpTest(final String text, final Object arg1, final Object arg2, final Object expected) throws Exception {
loadText(text);
System.out.println(generateToText());