[tests] Add test data for KT-54400
This commit is contained in:
committed by
Space Team
parent
126022a80d
commit
205d568545
@@ -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)
|
||||
}
|
||||
@@ -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 = 42
|
||||
}
|
||||
return "OK"
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
class Buildee<TV> {
|
||||
var typeVariableMutableProperty: TV
|
||||
get() = storage
|
||||
set(value) { storage = value }
|
||||
private var storage: TV = 42 as TV
|
||||
}
|
||||
|
||||
fun <PTV> build(instructions: Buildee<PTV>.() -> Unit): Buildee<PTV> {
|
||||
return Buildee<PTV>().apply(instructions)
|
||||
}
|
||||
@@ -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)
|
||||
}
|
||||
Reference in New Issue
Block a user