package com.myapp import android.content.Context fun foo(context: Context) { with (context) { with (2) { "zxc" } } } inline fun with(receiver: T, block: T.() -> R): R = receiver.block()