In Kotlin, when you call an extension function on a variable, the program looks at the variable's declared type to decide which extension function to run. It does not check the actual type of the object stored in the variable. For example, if you have a variable declared as Base but it holds a Derived object, calling an extension function defined for Base will run, not the one for Derived. This is because extension functions are resolved statically at compile time, unlike member functions which are polymorphic. The code example shows a Base.foo() extension and a Derived.foo() extension. When calling foo() on a Base-typed variable holding a Derived object, Base.foo() runs. This behavior is important to understand to avoid confusion about which function runs. Extensions are like helper functions tied to types, not to objects at runtime.