Two questions regarding Extension Functions:
1 - we can’t access to object’s private or protected properties within extension function. Am I right? Appart from that, What are the other differences between extension functions and normal functions that are defined within the class?
2 - what happens if we define two extension functions with same name and signature in two different module, and use them in a third module?
Module A: fun Int.foo(): Int = 1
Module B: fun Int.foo(): Int = 3
Module C (which has dependency to both A and B) :
val x = 2.foo() // the result will be 1 ? or 3 ? or compile error ?