```fun a(param:Int){ val v = param } //transfor...
# compiler
a
Copy code
fun 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?
a
to visit the
param.value
you could use
visitCall
to handle
param.value
if this was the question.