Skip to content

implicitReceiverSmartCasts

The list of implicit receiver smart casts which have refined the expression's implicit receivers to a more specific type. These smart casts are required for the expression to be evaluated. The list does not include smart casts for explicit receivers.

Example

if (this is String) {
  this.substring()   // 'this' receiver is explicit, so there is no implicit smart cast here.

  smartcast()        // 'this' receiver is implicit, therefore there is an implicit smart cast involved.
}