Say we have an implicit class like:
implicit class RichString(str: String) {
def sayHello(): String = s"Hello, ${str}!"
}
We can use the method sayHello as if it is defined on the String class
"World".sayHello
Does the scala compiler optimize this to something like a static call to avoid the overhead of constructing a RichString object?