failing test (infers boolean return type for some reason)
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
fun main() {
|
||||
var bottles = 99;
|
||||
while(bottles > 0) {
|
||||
System.out?.println("bottles of beer on the wall");
|
||||
bottles--;
|
||||
}
|
||||
}
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user