[tests] Add test data for KT-49263

This commit is contained in:
Stanislav Ruban
2023-11-30 22:03:17 +01:00
committed by Space Team
parent 2a257091fb
commit 9de8d020f1
3 changed files with 67 additions and 0 deletions
@@ -0,0 +1,23 @@
// ISSUE: KT-49263
// IGNORE_LIGHT_ANALYSIS
// IGNORE_BACKEND: ANY
// REASON: red code (see corresponding diagnostic test)
fun box(): String {
buildPostponedTypeVariable {
consumeTargetType(this)
}
return "OK"
}
class TargetType
fun consumeTargetType(value: TargetType) {}
fun <PTV> buildPostponedTypeVariable(block: PTV.() -> Unit): PTV {
return (TargetType() as PTV).apply(block)
}