Add box test for KT-33992

This commit is contained in:
Roman Artemev
2020-10-14 13:19:39 +03:00
parent 023a62395a
commit d7db643422
8 changed files with 63 additions and 0 deletions
@@ -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"
}
@@ -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");
@@ -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");
@@ -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");
@@ -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");
@@ -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");
@@ -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");