[tests] Add a test case for KT-61978
^KT-61978 Obsolete
This commit is contained in:
committed by
Space Team
parent
28c1049518
commit
269b60b420
+6
@@ -15472,6 +15472,12 @@ public class LLFirBlackBoxCodegenBasedTestGenerated extends AbstractLLFirBlackBo
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/delegatedPropertyInEnum.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("DelegationByFunctionWithEnumUpperBound.kt")
|
||||
public void testDelegationByFunctionWithEnumUpperBound() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/DelegationByFunctionWithEnumUpperBound.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("extensionDelegatesWithSameNames.kt")
|
||||
public void testExtensionDelegatesWithSameNames() throws Exception {
|
||||
|
||||
+6
@@ -15472,6 +15472,12 @@ public class LLFirReversedBlackBoxCodegenBasedTestGenerated extends AbstractLLFi
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/delegatedPropertyInEnum.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("DelegationByFunctionWithEnumUpperBound.kt")
|
||||
public void testDelegationByFunctionWithEnumUpperBound() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/DelegationByFunctionWithEnumUpperBound.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("extensionDelegatesWithSameNames.kt")
|
||||
public void testExtensionDelegatesWithSameNames() throws Exception {
|
||||
|
||||
+6
@@ -15413,6 +15413,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/delegatedPropertyInEnum.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("DelegationByFunctionWithEnumUpperBound.kt")
|
||||
public void testDelegationByFunctionWithEnumUpperBound() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/DelegationByFunctionWithEnumUpperBound.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("extensionDelegatesWithSameNames.kt")
|
||||
public void testExtensionDelegatesWithSameNames() throws Exception {
|
||||
|
||||
+6
@@ -15413,6 +15413,12 @@ public class FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/delegatedPropertyInEnum.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("DelegationByFunctionWithEnumUpperBound.kt")
|
||||
public void testDelegationByFunctionWithEnumUpperBound() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/DelegationByFunctionWithEnumUpperBound.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("extensionDelegatesWithSameNames.kt")
|
||||
public void testExtensionDelegatesWithSameNames() throws Exception {
|
||||
|
||||
+6
@@ -15413,6 +15413,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/delegatedPropertyInEnum.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("DelegationByFunctionWithEnumUpperBound.kt")
|
||||
public void testDelegationByFunctionWithEnumUpperBound() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/DelegationByFunctionWithEnumUpperBound.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("extensionDelegatesWithSameNames.kt")
|
||||
public void testExtensionDelegatesWithSameNames() throws Exception {
|
||||
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
// ISSUE: KT-61978
|
||||
// WITH_REFLECT
|
||||
// WITH_STDLIB
|
||||
|
||||
// IGNORE_INLINER: IR
|
||||
// java.lang.UnsupportedOperationException
|
||||
// (this function has a reified type parameter and thus can only be inlined at compilation time, not called directly)
|
||||
// at Klass.<init>(DelegationByFunctionWithEnumUpperBound.kt:23)
|
||||
|
||||
import kotlin.properties.ReadWriteProperty
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
enum class Enumeration { OK }
|
||||
|
||||
inline fun <reified T: Enum<T>> delegate() = object: ReadWriteProperty<Any?, T?> {
|
||||
override fun getValue(thisRef: Any?, property: KProperty<*>): T? = Enumeration.OK as T?
|
||||
override fun setValue(thisRef: Any?, property: KProperty<*>, value: T?) {}
|
||||
}
|
||||
|
||||
class Klass {
|
||||
var enumeration: Enumeration? by delegate()
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return Klass().enumeration.toString()
|
||||
}
|
||||
+6
@@ -15047,6 +15047,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/delegatedPropertyInEnum.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("DelegationByFunctionWithEnumUpperBound.kt")
|
||||
public void testDelegationByFunctionWithEnumUpperBound() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/DelegationByFunctionWithEnumUpperBound.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("extensionDelegatesWithSameNames.kt")
|
||||
public void testExtensionDelegatesWithSameNames() throws Exception {
|
||||
|
||||
+6
@@ -15413,6 +15413,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/delegatedPropertyInEnum.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("DelegationByFunctionWithEnumUpperBound.kt")
|
||||
public void testDelegationByFunctionWithEnumUpperBound() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/DelegationByFunctionWithEnumUpperBound.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("extensionDelegatesWithSameNames.kt")
|
||||
public void testExtensionDelegatesWithSameNames() throws Exception {
|
||||
|
||||
+6
@@ -15413,6 +15413,12 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/delegatedPropertyInEnum.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("DelegationByFunctionWithEnumUpperBound.kt")
|
||||
public void testDelegationByFunctionWithEnumUpperBound() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/DelegationByFunctionWithEnumUpperBound.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("extensionDelegatesWithSameNames.kt")
|
||||
public void testExtensionDelegatesWithSameNames() throws Exception {
|
||||
|
||||
+5
@@ -12664,6 +12664,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/delegatedPropertyInEnum.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("DelegationByFunctionWithEnumUpperBound.kt")
|
||||
public void testDelegationByFunctionWithEnumUpperBound() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/DelegationByFunctionWithEnumUpperBound.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionDelegatesWithSameNames.kt")
|
||||
public void testExtensionDelegatesWithSameNames() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/extensionDelegatesWithSameNames.kt");
|
||||
|
||||
+6
@@ -11519,6 +11519,12 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/delegatedPropertyInEnum.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("DelegationByFunctionWithEnumUpperBound.kt")
|
||||
public void testDelegationByFunctionWithEnumUpperBound() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/DelegationByFunctionWithEnumUpperBound.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("extensionDelegatesWithSameNames.kt")
|
||||
public void testExtensionDelegatesWithSameNames() throws Exception {
|
||||
|
||||
Generated
+6
@@ -11519,6 +11519,12 @@ public class FirJsES6CodegenBoxTestGenerated extends AbstractFirJsES6CodegenBoxT
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/delegatedPropertyInEnum.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("DelegationByFunctionWithEnumUpperBound.kt")
|
||||
public void testDelegationByFunctionWithEnumUpperBound() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/DelegationByFunctionWithEnumUpperBound.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("extensionDelegatesWithSameNames.kt")
|
||||
public void testExtensionDelegatesWithSameNames() throws Exception {
|
||||
|
||||
+6
@@ -11519,6 +11519,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/delegatedPropertyInEnum.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("DelegationByFunctionWithEnumUpperBound.kt")
|
||||
public void testDelegationByFunctionWithEnumUpperBound() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/DelegationByFunctionWithEnumUpperBound.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("extensionDelegatesWithSameNames.kt")
|
||||
public void testExtensionDelegatesWithSameNames() throws Exception {
|
||||
|
||||
+6
@@ -11519,6 +11519,12 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/delegatedPropertyInEnum.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("DelegationByFunctionWithEnumUpperBound.kt")
|
||||
public void testDelegationByFunctionWithEnumUpperBound() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/DelegationByFunctionWithEnumUpperBound.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("extensionDelegatesWithSameNames.kt")
|
||||
public void testExtensionDelegatesWithSameNames() throws Exception {
|
||||
|
||||
+6
@@ -12544,6 +12544,12 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/delegatedPropertyInEnum.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("DelegationByFunctionWithEnumUpperBound.kt")
|
||||
public void testDelegationByFunctionWithEnumUpperBound() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/DelegationByFunctionWithEnumUpperBound.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("extensionDelegatesWithSameNames.kt")
|
||||
public void testExtensionDelegatesWithSameNames() throws Exception {
|
||||
|
||||
+6
@@ -12838,6 +12838,12 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/delegatedPropertyInEnum.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("DelegationByFunctionWithEnumUpperBound.kt")
|
||||
public void testDelegationByFunctionWithEnumUpperBound() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/DelegationByFunctionWithEnumUpperBound.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("extensionDelegatesWithSameNames.kt")
|
||||
public void testExtensionDelegatesWithSameNames() throws Exception {
|
||||
|
||||
+6
@@ -12250,6 +12250,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/delegatedPropertyInEnum.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("DelegationByFunctionWithEnumUpperBound.kt")
|
||||
public void testDelegationByFunctionWithEnumUpperBound() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/DelegationByFunctionWithEnumUpperBound.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("extensionDelegatesWithSameNames.kt")
|
||||
public void testExtensionDelegatesWithSameNames() throws Exception {
|
||||
|
||||
+6
@@ -12545,6 +12545,12 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/delegatedPropertyInEnum.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("DelegationByFunctionWithEnumUpperBound.kt")
|
||||
public void testDelegationByFunctionWithEnumUpperBound() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/DelegationByFunctionWithEnumUpperBound.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("extensionDelegatesWithSameNames.kt")
|
||||
public void testExtensionDelegatesWithSameNames() throws Exception {
|
||||
|
||||
Generated
+6
@@ -11495,6 +11495,12 @@ public class FirWasmCodegenBoxTestGenerated extends AbstractFirWasmCodegenBoxTes
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/delegatedPropertyInEnum.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("DelegationByFunctionWithEnumUpperBound.kt")
|
||||
public void testDelegationByFunctionWithEnumUpperBound() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/DelegationByFunctionWithEnumUpperBound.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("extensionDelegatesWithSameNames.kt")
|
||||
public void testExtensionDelegatesWithSameNames() throws Exception {
|
||||
|
||||
Generated
+6
@@ -11495,6 +11495,12 @@ public class K1WasmCodegenBoxTestGenerated extends AbstractK1WasmCodegenBoxTest
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/delegatedPropertyInEnum.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("DelegationByFunctionWithEnumUpperBound.kt")
|
||||
public void testDelegationByFunctionWithEnumUpperBound() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/delegatedProperty/DelegationByFunctionWithEnumUpperBound.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("extensionDelegatesWithSameNames.kt")
|
||||
public void testExtensionDelegatesWithSameNames() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user