`Task.yield()` never resumes when having a borrowing access to a non-copyable member of a class with CoroutineAccessors enabled

class C { 
    var v: UniqueBox<Int> = .init(1)
}

func test() async {
    let c = C()
    let span = c.v.span
    print("before yield")
    await Task.yield()
    print("resumed \(span[0])")
}

await test()
swiftc -enable-experimental-feature CoroutineAccessors main.swift
./main

When executing the codes above with CoroutineAccessors enabled, the Task.yield function never resumes and the whole process just gets stuck.

But if we remove the CoroutineAccessors feature flag, it works fine.

What's happening here?

This seems to be a problem with the CoroutineAccessors feature being tested here rather than a problem with the code. The reason is that since class C is not final, the access to c.v is through an accessor coroutine which yields a borrow of the UniqueBox.
Since span depends on that borrow, the coroutine suspends at the yield point through the await Task.yield(). Without the flag, the accessor uses the older _read ABI which has its frame allocated in a caller provided buffer that can spill into the asynchronous frame. However, with the flag enabled, the accessor uses the newer yield_once_2 ABI which allocates its frame from the task allocator in asynchronous contexts.

Basically try making the class final.