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