failing test for kt343
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user