this) class DateContext val client = client { // .. . dob = 24 March 2000 } 24 March 2000 fun client(block: context(DateContext) ClientBuilder.() - > Unit): Client { val builder = ClientBuilder() with(DateContext()) { block(builder) } return builder.build() } Context object Context requirement Context requirement Context scope The function is available in the context scope The function is not available, missing DateContext