[tests] Add test data for KT-53422
This commit is contained in:
committed by
Space Team
parent
96e12584a1
commit
982e8133ba
@@ -0,0 +1,38 @@
|
||||
// ISSUE: KT-53422
|
||||
|
||||
// IGNORE_LIGHT_ANALYSIS
|
||||
// IGNORE_BACKEND: ANY
|
||||
// REASON: red code (see corresponding diagnostic test)
|
||||
|
||||
fun box(): String {
|
||||
stepByStepBuild(
|
||||
{
|
||||
it.concreteTypeMemberProperty
|
||||
TargetType()
|
||||
},
|
||||
{
|
||||
consumeTargetTypeBase(it)
|
||||
}
|
||||
)
|
||||
return "OK"
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
class ConcreteType
|
||||
open class TargetTypeBase {
|
||||
val concreteTypeMemberProperty: ConcreteType = ConcreteType()
|
||||
}
|
||||
class TargetType: TargetTypeBase()
|
||||
|
||||
fun consumeTargetTypeBase(value: TargetTypeBase) {}
|
||||
|
||||
class Buildee<TV>
|
||||
|
||||
fun <PTV> stepByStepBuild(
|
||||
instructionsA: Buildee<PTV>.(PTV) -> PTV,
|
||||
instructionsB: Buildee<PTV>.(PTV) -> Unit,
|
||||
): Buildee<PTV> {
|
||||
return Buildee<PTV>().apply { instructionsB(instructionsA(TargetType() as PTV)) }
|
||||
}
|
||||
Reference in New Issue
Block a user