failing test for kt343

This commit is contained in:
Alex Tkachman
2011-10-09 10:33:23 +02:00
parent 7bf066c4bf
commit 9f53486922
2 changed files with 21 additions and 0 deletions
@@ -0,0 +1,16 @@
import java.util.ArrayList
fun box(): String {
val list = ArrayList<Int>()
val foo : fun() : Unit = {
list.add(2) //first exception
}
foo()
// val bar = {
// val x = 1 //second exception
// }
// bar()
return if (list.get(0) == 2) "OK" else "fail"
}
@@ -185,4 +185,9 @@ public class ClassGenTest extends CodegenTestCase {
assertEquals(method.getReturnType().getName(), "java.lang.Object");
System.out.println(generateToText());
}
public void testKt343 () throws Exception {
blackBoxFile("regressions/kt343.jet");
System.out.println(generateToText());
}
}