Tests for not reproduced KT-1770, KT-3001 and KT-3414
#KT-3414 Can't Reproduced #KT-3001 Can't Reproduced #KT-1770 Can't Reproduced
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
trait A {
|
||||
val result: String
|
||||
}
|
||||
|
||||
class Base(override val result: String) : A
|
||||
|
||||
open class Derived : A by Base("OK")
|
||||
|
||||
class Z : Derived()
|
||||
|
||||
fun box() = Z().result
|
||||
@@ -0,0 +1,18 @@
|
||||
trait A {
|
||||
fun foo(): Int
|
||||
}
|
||||
|
||||
trait B {
|
||||
fun foo(): Int
|
||||
}
|
||||
|
||||
class Z(val a: A) : A by a, B
|
||||
|
||||
fun box(): String {
|
||||
val s = Z(object : A {
|
||||
override fun foo(): Int {
|
||||
return 1;
|
||||
}
|
||||
});
|
||||
return if (s.foo() == 1) "OK" else "fail"
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import org.w3c.dom.Element
|
||||
import org.xml.sax.InputSource
|
||||
import javax.xml.parsers.DocumentBuilderFactory
|
||||
import java.io.StringReader
|
||||
|
||||
class MyElement(e: Element): Element by e {
|
||||
fun bar() = "OK"
|
||||
}
|
||||
|
||||
fun box() : String {
|
||||
val factory = DocumentBuilderFactory.newInstance()!!;
|
||||
val builder = factory.newDocumentBuilder()!!;
|
||||
val source = InputSource(StringReader("<OK></OK>"));
|
||||
val doc = builder.parse(source)!!;
|
||||
val myElement = MyElement(doc.getDocumentElement()!!)
|
||||
return myElement.getTagName()!!
|
||||
}
|
||||
@@ -960,11 +960,21 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
doTest("compiler/testData/codegen/box/classes/kt285.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt3001.kt")
|
||||
public void testKt3001() throws Exception {
|
||||
doTest("compiler/testData/codegen/box/classes/kt3001.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt3114.kt")
|
||||
public void testKt3114() throws Exception {
|
||||
doTest("compiler/testData/codegen/box/classes/kt3114.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt3414.kt")
|
||||
public void testKt3414() throws Exception {
|
||||
doTest("compiler/testData/codegen/box/classes/kt3414.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt343.kt")
|
||||
public void testKt343() throws Exception {
|
||||
doTest("compiler/testData/codegen/box/classes/kt343.kt");
|
||||
|
||||
+5
@@ -654,6 +654,11 @@ public class BlackBoxWithStdlibCodegenTestGenerated extends AbstractBlackBoxCode
|
||||
doTestWithStdlib("compiler/testData/codegen/boxWithStdlib/regressions/kt1733.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt1770.kt")
|
||||
public void testKt1770() throws Exception {
|
||||
doTestWithStdlib("compiler/testData/codegen/boxWithStdlib/regressions/kt1770.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt1779.kt")
|
||||
public void testKt1779() throws Exception {
|
||||
doTestWithStdlib("compiler/testData/codegen/boxWithStdlib/regressions/kt1779.kt");
|
||||
|
||||
Reference in New Issue
Block a user