What will happen if I change the access modifier of an extension function to private
? Does it have any effect? Does it matter?!
private
fun String.myExtensionFunction() { // ... }
The extension method will only be seen in the class/file it is declared in.
Without private the extension method would be public and could be called from the outside.