I want to write an IR which will skip the default ...
# compiler
f
I want to write an IR which will skip the default parameter values of fn call and use the params i am injecting into its IR...
Copy code
ex :
fun foo(s : String = "") {
    println(s);
}

During IR is will pass some value to foo() at 0th argument and println(s) should use the new arg
y
I believe it just works, no? Just make an IR Call that calls
foo
with one argument and it should work just fine
f
Actually i am trying with composables. Composable usually have modifier as Default value like Text composable… I have a custom modifier which i want to pass via my compiler plugin to the Text composable…. Now.. if a modifier is explicitly passed than i can just add the receiver of custom modifier to this one. But if no modifier is passed and default modifier is playing the game. Here things are going wrong..
y
Oh so you want to copy the default value to the call site? I don't think that's generally possible because it might use something
private
in file
f
I tried to set the receiver of custom modifier to this default modifier, at compile time no issues but at runtime i get null pointer exception, stating receiver of custom modifier is null