class Counter { fld count: Int mut getAndIncrement() -> Int { let result = count count++ result } } @Synthetic class MyClosure(delegate: Counter) : MutClosure(Int, Int) -> Int |delegate| { mut fn call(x: Int, y: Int) -> Int { x + y + delegate.getAndIncrement() } }