Add test for obsolete issue

#KT-39588 Obsolete
This commit is contained in:
Mikhail Zarechenskiy
2020-07-05 18:17:44 +03:00
parent 03d5fe8d6c
commit d8f701ee61
8 changed files with 57 additions and 0 deletions
@@ -9636,6 +9636,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/kt18902.kt");
}
@TestMetadata("kt39588.kt")
public void testKt39588() throws Exception {
runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/kt39588.kt");
}
@TestMetadata("local.kt")
public void testLocal() throws Exception {
runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/local.kt");
@@ -0,0 +1,22 @@
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: JVM_IR
import kotlin.reflect.KProperty
class OptionDescriptor<T>
interface ArgumentValueDelegate<T> {
operator fun getValue(thisRef: Any?, property: KProperty<*>): T = "OK" as T
}
abstract class CLIEntity<TResult> constructor(val delegate: ArgumentValueDelegate<TResult>) {
operator fun provideDelegate(thisRef: Any?, prop: KProperty<*>): ArgumentValueDelegate<TResult> = delegate
}
abstract class AbstractSingleOption<T : Any, TResult> constructor(delegate: ArgumentValueDelegate<TResult>) : CLIEntity<TResult>(delegate)
class ArgumentSingleNullableValue<T : Any>(descriptor: OptionDescriptor<T>): ArgumentValueDelegate<T?>
class SingleNullableOption<T : Any> constructor(descriptor: OptionDescriptor<T>) : AbstractSingleOption<T, T?>(ArgumentSingleNullableValue(descriptor))
fun box(): String {
val x: List<Any>? by SingleNullableOption(OptionDescriptor())
return x.toString()
}
@@ -10861,6 +10861,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/kt18902.kt");
}
@TestMetadata("kt39588.kt")
public void testKt39588() throws Exception {
runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/kt39588.kt");
}
@TestMetadata("local.kt")
public void testLocal() throws Exception {
runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/local.kt");
@@ -10861,6 +10861,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/kt18902.kt");
}
@TestMetadata("kt39588.kt")
public void testKt39588() throws Exception {
runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/kt39588.kt");
}
@TestMetadata("local.kt")
public void testLocal() throws Exception {
runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/local.kt");
@@ -9636,6 +9636,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/kt18902.kt");
}
@TestMetadata("kt39588.kt")
public void testKt39588() throws Exception {
runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/kt39588.kt");
}
@TestMetadata("local.kt")
public void testLocal() throws Exception {
runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/local.kt");
@@ -8276,6 +8276,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/kt18902.kt");
}
@TestMetadata("kt39588.kt")
public void testKt39588() throws Exception {
runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/kt39588.kt");
}
@TestMetadata("local.kt")
public void testLocal() throws Exception {
runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/local.kt");
@@ -8286,6 +8286,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/kt18902.kt");
}
@TestMetadata("kt39588.kt")
public void testKt39588() throws Exception {
runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/kt39588.kt");
}
@TestMetadata("local.kt")
public void testLocal() throws Exception {
runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/local.kt");
@@ -8286,6 +8286,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/kt18902.kt");
}
@TestMetadata("kt39588.kt")
public void testKt39588() throws Exception {
runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/kt39588.kt");
}
@TestMetadata("local.kt")
public void testLocal() throws Exception {
runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/local.kt");