Cuckoo icon indicating copy to clipboard operation
Cuckoo copied to clipboard

Cuckoo does not support block-type closure

Open DanyilNefodov opened this issue 1 year ago • 2 comments

Hi!

I have next protocol with block-type closure:

protocol AsyncSampleProtocol {
    func async(execute work: @escaping @convention(block) () -> Void)
}

extension AsyncSample : AsyncSampleProtocol {
    func async(execute work: @escaping @convention(block) () -> Void) {
        async(group: nil, qos: .unspecified, flags: [], execute: work)
    }
}

When add this files to generator input it fails with:

Script path: /path/to/generator/CuckooGenerator
xargs: /path/to/generator/cuckoo_generator: terminated with signal 11; aborting

DanyilNefodov avatar Aug 15 '23 11:08 DanyilNefodov

Hi, yeah, this is one of the last things I want to fix before releasing the SwiftSyntax version that's in progress. Unfortunately it requires me to redo the typing system to be more flexible for which I haven't been able to find enough motivation so far.

MatyasKriz avatar Aug 15 '23 16:08 MatyasKriz

Good news is that I've added support for this attribute in the upcoming release of Cuckoo 2.0. 🙂

MatyasKriz avatar Oct 04 '23 21:10 MatyasKriz