August 2017
Intermediate to advanced
440 pages
10h
English
An extension function is compiled to a static function with a receiver object on the first parameter, so we have no extra access privilege. The private and protected elements are not accessible, and elements with Java's default, Java's package, or Kotlin's internal modifiers are accessed in the same way as if we just operate on a standard object.
Thanks to that, these elements are protected as they should be. Remember that extension functions, while being really powerful and useful, are just syntactic sugar, and there is no magic there.
Read now
Unlock full access