Minor, add regression test

#KT-42562
This commit is contained in:
Alexander Udalov
2020-10-12 21:37:37 +02:00
parent 2ff011af17
commit 1daeebcdd3
5 changed files with 34 additions and 0 deletions

View File

@@ -10244,6 +10244,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
public void testLocalVarNoExplicitType() throws Exception {
runTest("compiler/testData/codegen/box/delegatedProperty/local/localVarNoExplicitType.kt");
}
@TestMetadata("useReflectionForLocalVarInLambda.kt")
public void testUseReflectionForLocalVarInLambda() throws Exception {
runTest("compiler/testData/codegen/box/delegatedProperty/local/useReflectionForLocalVarInLambda.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/delegatedProperty/optimizedDelegatedProperties")

View File

@@ -0,0 +1,14 @@
// TARGET_BACKEND: JVM
// WITH_REFLECT
import kotlin.reflect.*
object E
operator fun E.getValue(receiver: Any?, property: KProperty<*>): String =
if (property.returnType.classifier == String::class) "OK" else "Fail"
fun box(): String = {
val x: String by E
x
}()

View File

@@ -11639,6 +11639,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
public void testLocalVarNoExplicitType() throws Exception {
runTest("compiler/testData/codegen/box/delegatedProperty/local/localVarNoExplicitType.kt");
}
@TestMetadata("useReflectionForLocalVarInLambda.kt")
public void testUseReflectionForLocalVarInLambda() throws Exception {
runTest("compiler/testData/codegen/box/delegatedProperty/local/useReflectionForLocalVarInLambda.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/delegatedProperty/optimizedDelegatedProperties")

View File

@@ -11639,6 +11639,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
public void testLocalVarNoExplicitType() throws Exception {
runTest("compiler/testData/codegen/box/delegatedProperty/local/localVarNoExplicitType.kt");
}
@TestMetadata("useReflectionForLocalVarInLambda.kt")
public void testUseReflectionForLocalVarInLambda() throws Exception {
runTest("compiler/testData/codegen/box/delegatedProperty/local/useReflectionForLocalVarInLambda.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/delegatedProperty/optimizedDelegatedProperties")

View File

@@ -10244,6 +10244,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
public void testLocalVarNoExplicitType() throws Exception {
runTest("compiler/testData/codegen/box/delegatedProperty/local/localVarNoExplicitType.kt");
}
@TestMetadata("useReflectionForLocalVarInLambda.kt")
public void testUseReflectionForLocalVarInLambda() throws Exception {
runTest("compiler/testData/codegen/box/delegatedProperty/local/useReflectionForLocalVarInLambda.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/delegatedProperty/optimizedDelegatedProperties")