toUpperCase() is a function that can only be called on variables of type String. Because the Kotlin compiler has inferred languageName as a String, you can safely call toUpperCase(). inc(), however, is an Int operator function, so it can’t be called on a String.