August Lilleaas
09/05/2022, 8:32 PMrespondHtml(status) { with(template) { apply() } } is used as just doing template.apply() triggers the built in scope function apply . What is it about the use of with that makes Kotlin invoke the apply method on HTML<T> rather than the scope function? Is it something about member functions taking presedence in the parser/compiler when it’s called without an explicit receiver, or something like that? If I try and change it to with(resp.body) { this.apply() }, i.e. explicitly using this inside with, it tries to call the scope function again.