This expressions
To denote the current receiver, you use this expressions:
In a member of a class,
thisrefers to the current object of that class.In an extension function or a function literal with receiver
thisdenotes the receiver parameter that is passed on the left-hand side of a dot.
If this has no qualifiers, it refers to the innermost enclosing scope. To refer to this in other scopes, label qualifiers are used:
Qualified this
To access this from an outer scope (a class, extension function, or labeled function literal with receiver) you write this@label, where @label is a label on the scope this is meant to be from:
Implicit this
When you call a member function on this, you can omit the this. qualifier. However, if another callable with the same name is available in a closer lexical scope, Kotlin resolves the unqualified call to that callable instead of the member function. To explicitly call the member function, use the this. qualifier: