Reputation: 2861
Is it possible do this kind of assignment in Kotlin somehow?
data class MyData(var v: Int?)
fun myFunction(v: Int) {
val myData = MyData(null).apply {
v = @myFunction.v //does not work
}
}
PS: the example is unreal is just for the purpose of demonstrating the idea
Upvotes: 0
Views: 29