Correct. That’s just routine overloading, and has nothing to do with apply() per se – you are always allowed to overload a method name with multiple implementations that have different signatures. (Not everyone thinks this is a wise thing to do, but it’s totally legal.)

This is not a case of overloading. Overloading is when you have two methods in the same scope with different signatures. That isn’t what is going on here. These two apply methods are in completely different scopes. We can illustrate that with the following little example.

Note that both definitions of foo have the same signature. That wouldn’t be allowed for overloading. It is legal here because this isn’t overloading. One version must be called on an instance of the class while the other must be called on the companion object.