Extension methods and visibility

I found a way to do it in Scala. The protected modifier can be qualified with the package name. However, that does not buy you much. You have to provide the same package name as the package the extended class resides in. If that is the case you own the package anyway and can add the method to the class right away without a need for an extension method.