test for unreproducable KT-640

This commit is contained in:
Alex Tkachman
2011-11-28 15:12:09 +02:00
parent afd8981c00
commit a9c4073f8c
3 changed files with 38 additions and 4 deletions
@@ -0,0 +1,29 @@
namespace demo
public open class Identifier<T>(myName : T?, myHasDollar : Boolean) {
{
$myName = myName
$myHasDollar = myHasDollar
}
private val myName : T?
private var myHasDollar : Boolean
private var myNullable : Boolean = true
open public fun getName() : T? {
return myName
}
class object {
open public fun init<T>(name : T?) : Identifier<T> {
val __ = Identifier<T>(name, false)
return __
}
}
}
fun box() : String {
var i3 : Identifier<*>? = Identifier.init<String?>("name")
System.out?.println("Hello, " + i3?.getName())
return "OK"
}
@@ -25,4 +25,8 @@ public class ObjectGenTest extends CodegenTestCase {
public void testKt560() throws Exception {
blackBoxFile("regressions/kt560.jet");
}
public void testKt640() throws Exception {
blackBoxFile("regressions/kt640.jet");
}
}
@@ -76,14 +76,15 @@ public class CompileEnvironmentTest extends TestCase {
}
}
private static void delete(File file) {
private static boolean delete(File file) {
boolean success = true;
if(file.isDirectory()) {
for (File child : file.listFiles()) {
delete(child);
success = success && delete(child);
}
}
file.delete();
return file.delete() && success;
}
public void testSmokeWithCompilerOutput() throws IOException {
@@ -101,7 +102,7 @@ public class CompileEnvironmentTest extends TestCase {
}
}
private List<String> listEntries(JarInputStream is) throws IOException {
private static List<String> listEntries(JarInputStream is) throws IOException {
List<String> entries = new ArrayList<String>();
while (true) {
final JarEntry jarEntry = is.getNextJarEntry();