I've just updated <kotlin-null-defaults> to versio...
# feed
y
I've just updated kotlin-null-defaults to version 0.2.0 🎉 It's a Kotlin compiler plugin that works on all backends and allows platform callers (as in Java or JS callers) to call any kotlin function annotated with
@NullDefaults
with
null
for a default argument and the function replaces that argument with the default value. Check the repo for more examples E.g:
Copy code
// Kotlin
fun test(value: Int = 42) {
    println(value)
}
// Java
public static void main(String[] args){
  TestKt.test(null); // Prints 42
}
Try it today:
Copy code
plugins {
  ...
  id("io.github.kyay10.kotlin-null-defaults") version "0.2.0"
}
👍🏾 1
👍🏻 1
👍 2
K 3