[tests] Add test data for KT-54400

This commit is contained in:
Stanislav Ruban
2023-12-02 15:25:37 +01:00
committed by Space Team
parent 126022a80d
commit 205d568545
9 changed files with 228 additions and 0 deletions
@@ -0,0 +1,26 @@
// ISSUE: KT-54400
// IGNORE_LIGHT_ANALYSIS
// IGNORE_BACKEND: ANY
// REASON: red code (see corresponding diagnostic test)
fun box(): String {
build {
typeVariableMutableProperty = ""
}
return "OK"
}
class Buildee<TV> {
var typeVariableMutableProperty: TV
get() = storage
set(value) { storage = value }
private var storage: TV = "" as TV
}
fun <PTV> build(instructions: Buildee<PTV>.() -> Unit): Buildee<PTV> {
return Buildee<PTV>().apply(instructions)
}