Add box test for KT-33992
This commit is contained in:
Generated
+5
@@ -26422,6 +26422,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/reflection/classLiterals/genericClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("lambdaClass.kt")
|
||||
public void testLambdaClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/classLiterals/lambdaClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("reifiedTypeClassLiteral.kt")
|
||||
public void testReifiedTypeClassLiteral() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/classLiterals/reifiedTypeClassLiteral.kt");
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
|
||||
// KT-33992
|
||||
|
||||
class P<T>(val a: T, val b: T)
|
||||
|
||||
inline fun foo(x: () -> Any) = P(x(), x())
|
||||
|
||||
fun box(): String {
|
||||
val p1 = foo {
|
||||
class C
|
||||
C()
|
||||
}
|
||||
val p2 = foo {
|
||||
object {}
|
||||
}
|
||||
|
||||
val x = p1.a
|
||||
val y = p1.b
|
||||
|
||||
val a = p2.a
|
||||
val b = p2.b
|
||||
|
||||
if (x::class != y::class) return "FAIL 1"
|
||||
if (a::class != b::class) return "FAIL 2"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
|
||||
+5
@@ -28193,6 +28193,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/reflection/classLiterals/genericClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("lambdaClass.kt")
|
||||
public void testLambdaClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/classLiterals/lambdaClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("reifiedTypeClassLiteral.kt")
|
||||
public void testReifiedTypeClassLiteral() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/classLiterals/reifiedTypeClassLiteral.kt");
|
||||
|
||||
+5
@@ -25827,6 +25827,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/reflection/classLiterals/genericClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("lambdaClass.kt")
|
||||
public void testLambdaClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/classLiterals/lambdaClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("reifiedTypeClassLiteral.kt")
|
||||
public void testReifiedTypeClassLiteral() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/classLiterals/reifiedTypeClassLiteral.kt");
|
||||
|
||||
+5
@@ -26422,6 +26422,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/reflection/classLiterals/genericClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("lambdaClass.kt")
|
||||
public void testLambdaClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/classLiterals/lambdaClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("reifiedTypeClassLiteral.kt")
|
||||
public void testReifiedTypeClassLiteral() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/classLiterals/reifiedTypeClassLiteral.kt");
|
||||
|
||||
Generated
+5
@@ -22348,6 +22348,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
|
||||
runTest("compiler/testData/codegen/box/reflection/classLiterals/genericClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("lambdaClass.kt")
|
||||
public void testLambdaClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/classLiterals/lambdaClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("simpleClassLiteral.kt")
|
||||
public void testSimpleClassLiteral() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/classLiterals/simpleClassLiteral.kt");
|
||||
|
||||
Generated
+5
@@ -22348,6 +22348,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/reflection/classLiterals/genericClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("lambdaClass.kt")
|
||||
public void testLambdaClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/classLiterals/lambdaClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("simpleClassLiteral.kt")
|
||||
public void testSimpleClassLiteral() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/classLiterals/simpleClassLiteral.kt");
|
||||
|
||||
+5
@@ -22363,6 +22363,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/reflection/classLiterals/genericClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("lambdaClass.kt")
|
||||
public void testLambdaClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/classLiterals/lambdaClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("simpleClassLiteral.kt")
|
||||
public void testSimpleClassLiteral() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/classLiterals/simpleClassLiteral.kt");
|
||||
|
||||
Reference in New Issue
Block a user