Spot the bug in the JobQueue

from Closures
Swift 6.3.3 intermediate 4 min 1 issue to find

Find why this queue does not compile.

swift
final class JobQueue {
    private var jobs: [() -> Void] = []

    func enqueue(_ job: () -> Void) {
        jobs.append(job)
    }
}
Open in playground
Report an error