Is there a solution yet to add "static extension m...
# announcements
j
Is there a solution yet to add "static extension methods" on all classes? currently have to add a blank companion object first (which is not always possible if it's someone else's class)
Copy code
fun Int.Companion.random(max: Int): Int {
	return ThreadLocalRandom.current().nextInt(max)
}
https://discuss.kotlinlang.org/t/companion-object-and-function-extension/1921
🚫 2