receiverOrContextOf

fun IrFunction.receiverOrContextOf(type: IrClassSymbol): IrValueParameter?(source)

The first context parameter or extension receiver of this function whose type is a subtype of type — i.e., a value of type "in scope" for the function. Used to pick up a TracingContext or TracingEvent.Span provided via context(_: …) or an extension receiver.