interface MySeq { fun yield(arg: T) } fun mySeq(f: MySeq.() -> Unit): MySeq = null!! class Test { fun repro() = mySeq { mySeq { yield(1.0) } } }