Merge pull request #621 from JetBrains/rr/yole/kt4142
Regression tests for some more obsolete issues in the JVM backend
This commit is contained in:
@@ -0,0 +1,16 @@
|
|||||||
|
open class B {
|
||||||
|
val name: String
|
||||||
|
get() = "OK"
|
||||||
|
}
|
||||||
|
|
||||||
|
trait A {
|
||||||
|
val name: String
|
||||||
|
}
|
||||||
|
|
||||||
|
class C : B(), A {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
return C().name
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
fun box(): String {
|
||||||
|
val s: String? = "a"
|
||||||
|
val o: Char? = s?.charAt(0)
|
||||||
|
val c: Any? = o?.javaClass
|
||||||
|
return if (c != null) "OK" else "fail"
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
class D {
|
||||||
|
companion object {
|
||||||
|
protected val F: String = "OK"
|
||||||
|
}
|
||||||
|
|
||||||
|
inner class E {
|
||||||
|
fun foo() = F
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
return D().E().foo()
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fun box(): String {
|
||||||
|
val res = (1..3).map { it ->
|
||||||
|
if (it == 1)
|
||||||
|
2
|
||||||
|
};
|
||||||
|
|
||||||
|
var result = ""
|
||||||
|
for (i in res)
|
||||||
|
result += " "
|
||||||
|
return if (result == " ") "OK" else result
|
||||||
|
}
|
||||||
+24
@@ -3068,6 +3068,18 @@ public class BlackBoxWithStdlibCodegenTestGenerated extends AbstractBlackBoxCode
|
|||||||
doTestWithStdlib(fileName);
|
doTestWithStdlib(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("kt4142.kt")
|
||||||
|
public void testKt4142() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/regressions/kt4142.kt");
|
||||||
|
doTestWithStdlib(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("kt4259.kt")
|
||||||
|
public void testKt4259() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/regressions/kt4259.kt");
|
||||||
|
doTestWithStdlib(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("kt4262.kt")
|
@TestMetadata("kt4262.kt")
|
||||||
public void testKt4262() throws Exception {
|
public void testKt4262() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/regressions/kt4262.kt");
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/regressions/kt4262.kt");
|
||||||
@@ -3098,6 +3110,18 @@ public class BlackBoxWithStdlibCodegenTestGenerated extends AbstractBlackBoxCode
|
|||||||
doTestWithStdlib(fileName);
|
doTestWithStdlib(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("kt5395.kt")
|
||||||
|
public void testKt5395() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/regressions/kt5395.kt");
|
||||||
|
doTestWithStdlib(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("kt5953.kt")
|
||||||
|
public void testKt5953() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/regressions/kt5953.kt");
|
||||||
|
doTestWithStdlib(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("kt6434.kt")
|
@TestMetadata("kt6434.kt")
|
||||||
public void testKt6434() throws Exception {
|
public void testKt6434() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/regressions/kt6434.kt");
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/regressions/kt6434.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user