Minor, add regression test
#KT-42562
This commit is contained in:
Generated
+5
@@ -10244,6 +10244,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
|||||||
public void testLocalVarNoExplicitType() throws Exception {
|
public void testLocalVarNoExplicitType() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/delegatedProperty/local/localVarNoExplicitType.kt");
|
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")
|
@TestMetadata("compiler/testData/codegen/box/delegatedProperty/optimizedDelegatedProperties")
|
||||||
|
|||||||
+14
@@ -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
|
||||||
|
}()
|
||||||
+5
@@ -11639,6 +11639,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
public void testLocalVarNoExplicitType() throws Exception {
|
public void testLocalVarNoExplicitType() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/delegatedProperty/local/localVarNoExplicitType.kt");
|
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")
|
@TestMetadata("compiler/testData/codegen/box/delegatedProperty/optimizedDelegatedProperties")
|
||||||
|
|||||||
+5
@@ -11639,6 +11639,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
|||||||
public void testLocalVarNoExplicitType() throws Exception {
|
public void testLocalVarNoExplicitType() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/delegatedProperty/local/localVarNoExplicitType.kt");
|
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")
|
@TestMetadata("compiler/testData/codegen/box/delegatedProperty/optimizedDelegatedProperties")
|
||||||
|
|||||||
+5
@@ -10244,6 +10244,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
|||||||
public void testLocalVarNoExplicitType() throws Exception {
|
public void testLocalVarNoExplicitType() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/delegatedProperty/local/localVarNoExplicitType.kt");
|
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")
|
@TestMetadata("compiler/testData/codegen/box/delegatedProperty/optimizedDelegatedProperties")
|
||||||
|
|||||||
Reference in New Issue
Block a user