Add tests extracted from regressions
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// FILE: A.kt
|
||||
|
||||
interface A : B
|
||||
|
||||
fun box(): String = object : A {}.foo()
|
||||
|
||||
// FILE: B.kt
|
||||
|
||||
interface Base {
|
||||
fun foo(s: String = "OK"): String = s
|
||||
}
|
||||
|
||||
interface B : Base
|
||||
@@ -0,0 +1,12 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
// KJS_WITH_FULL_RUNTIME
|
||||
|
||||
class A {
|
||||
val s: Sequence<String> = sequence {
|
||||
val a = {}
|
||||
yield("OK")
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String = A().s.single()
|
||||
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
// WITH_REFLECT
|
||||
|
||||
import kotlin.reflect.jvm.*
|
||||
import kotlin.test.assertNotNull
|
||||
|
||||
fun box(): String {
|
||||
assertNotNull({}.reflect())
|
||||
assertNotNull(Array(1) { {} }.single().reflect())
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+15
@@ -9246,6 +9246,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/callDefaultFromInitializer.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("complexInheritance.kt")
|
||||
public void testComplexInheritance() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/complexInheritance.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("implementedByFake.kt")
|
||||
public void testImplementedByFake() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/implementedByFake.kt");
|
||||
@@ -19451,6 +19456,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/properties/companionPrivateFieldInsideLambda.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("complexPropertyInitializer.kt")
|
||||
public void testComplexPropertyInitializer() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/properties/complexPropertyInitializer.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("field.kt")
|
||||
public void testField() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/properties/field.kt");
|
||||
@@ -24421,6 +24431,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/reflection/lambdaClasses/reflectOnDefaultWithInlineClassArgument.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("reflectOnLambdaInArrayConstructor.kt")
|
||||
public void testReflectOnLambdaInArrayConstructor() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/lambdaClasses/reflectOnLambdaInArrayConstructor.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("reflectOnLambdaInField.kt")
|
||||
public void testReflectOnLambdaInField() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/lambdaClasses/reflectOnLambdaInField.kt");
|
||||
|
||||
+15
@@ -9261,6 +9261,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/callDefaultFromInitializer.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("complexInheritance.kt")
|
||||
public void testComplexInheritance() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/complexInheritance.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inheritedFromInterfaceViaAbstractSuperclass.kt")
|
||||
public void testInheritedFromInterfaceViaAbstractSuperclass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/inheritedFromInterfaceViaAbstractSuperclass.kt");
|
||||
@@ -19456,6 +19461,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/properties/companionPrivateFieldInsideLambda.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("complexPropertyInitializer.kt")
|
||||
public void testComplexPropertyInitializer() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/properties/complexPropertyInitializer.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("field.kt")
|
||||
public void testField() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/properties/field.kt");
|
||||
@@ -23238,6 +23248,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/reflection/lambdaClasses/reflectOnDefaultWithInlineClassArgument.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("reflectOnLambdaInArrayConstructor.kt")
|
||||
public void testReflectOnLambdaInArrayConstructor() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/lambdaClasses/reflectOnLambdaInArrayConstructor.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("reflectOnLambdaInField.kt")
|
||||
public void testReflectOnLambdaInField() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/lambdaClasses/reflectOnLambdaInField.kt");
|
||||
|
||||
+15
@@ -8121,6 +8121,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/callDefaultFromInitializer.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("complexInheritance.kt")
|
||||
public void testComplexInheritance() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/complexInheritance.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("implementedByFake.kt")
|
||||
public void testImplementedByFake() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/implementedByFake.kt");
|
||||
@@ -17960,6 +17965,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/properties/companionPrivateFieldInsideLambda.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("complexPropertyInitializer.kt")
|
||||
public void testComplexPropertyInitializer() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/properties/complexPropertyInitializer.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("field.kt")
|
||||
public void testField() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/properties/field.kt");
|
||||
@@ -22930,6 +22940,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/reflection/lambdaClasses/reflectOnDefaultWithInlineClassArgument.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("reflectOnLambdaInArrayConstructor.kt")
|
||||
public void testReflectOnLambdaInArrayConstructor() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/lambdaClasses/reflectOnLambdaInArrayConstructor.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("reflectOnLambdaInField.kt")
|
||||
public void testReflectOnLambdaInField() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/lambdaClasses/reflectOnLambdaInField.kt");
|
||||
|
||||
+15
@@ -8121,6 +8121,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/callDefaultFromInitializer.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("complexInheritance.kt")
|
||||
public void testComplexInheritance() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/complexInheritance.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("implementedByFake.kt")
|
||||
public void testImplementedByFake() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/implementedByFake.kt");
|
||||
@@ -17960,6 +17965,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/properties/companionPrivateFieldInsideLambda.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("complexPropertyInitializer.kt")
|
||||
public void testComplexPropertyInitializer() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/properties/complexPropertyInitializer.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("field.kt")
|
||||
public void testField() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/properties/field.kt");
|
||||
@@ -22930,6 +22940,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/reflection/lambdaClasses/reflectOnDefaultWithInlineClassArgument.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("reflectOnLambdaInArrayConstructor.kt")
|
||||
public void testReflectOnLambdaInArrayConstructor() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/lambdaClasses/reflectOnLambdaInArrayConstructor.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("reflectOnLambdaInField.kt")
|
||||
public void testReflectOnLambdaInField() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/lambdaClasses/reflectOnLambdaInField.kt");
|
||||
|
||||
Generated
+10
@@ -6906,6 +6906,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/callDefaultFromInitializer.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("complexInheritance.kt")
|
||||
public void testComplexInheritance() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/complexInheritance.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("implementedByFake.kt")
|
||||
public void testImplementedByFake() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/implementedByFake.kt");
|
||||
@@ -15041,6 +15046,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/properties/companionPrivateFieldInsideLambda.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("complexPropertyInitializer.kt")
|
||||
public void testComplexPropertyInitializer() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/properties/complexPropertyInitializer.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("field.kt")
|
||||
public void testField() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/properties/field.kt");
|
||||
|
||||
+10
@@ -6906,6 +6906,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/callDefaultFromInitializer.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("complexInheritance.kt")
|
||||
public void testComplexInheritance() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/complexInheritance.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("implementedByFake.kt")
|
||||
public void testImplementedByFake() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/implementedByFake.kt");
|
||||
@@ -15146,6 +15151,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/properties/companionPrivateFieldInsideLambda.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("complexPropertyInitializer.kt")
|
||||
public void testComplexPropertyInitializer() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/properties/complexPropertyInitializer.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("field.kt")
|
||||
public void testField() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/properties/field.kt");
|
||||
|
||||
Reference in New Issue
Block a user