Ayla
10/23/2023, 7:02 AMfun a(param:Int){
val v = param
}
//transformed to
fun a(param:State<Int>){
val v = param.value
}
To do such a transformation, I need to change the param type first.
But I don't know how to handle the function body. The IR for param
before transformation is Get_Var
, and the after for param.value
is Call
, it seems I cannot directly use visitGetValue
to do it. Is there another methods to use?Artem Kobzar
10/23/2023, 7:06 AMparam.value
you could use visitCall
to handle param.value
if this was the question.