title: Escaping block as argument to an escaping argument
body: <p>I'd like to schedule jobs, and pass a completion handler to each job like so:</p>
  
  <pre><code>class Scheduler {
      var jobs = [(() -&gt; ()) -&gt; ()]()
  
      func schedule(block: @escaping (() -&gt; ()) -&gt; ()) {
          jobs.append(block)
      }
  
      func run() {
          if !jobs.isEmpty {
              let job = jobs.removeFirst()
              // Run the next job when this job is done
              job { self.run() }
          }
      }
  }
  
  func test() {
      let s = Scheduler()
      s.schedule { next in
          // Perform some work, this requires `next` to be escaping:
          DispatchQueue.main.async(execute: next)
      }
      // later
      s.run()
  }
  </code></pre>
  
  <p>The swift compiler does not like that next is escaping, without being marked as such:</p>
  
  <pre><code>main.swift:22:43: error: passing non-escaping parameter 'next' to function expecting an @escaping closure
          DispatchQueue.main.async(execute: next)
                                            ^
  main.swift:21:28: note: parameter 'next' is implicitly non-escaping
      Scheduler().schedule { next in
                             ^
  </code></pre>
  
  <p>The obvious change would be to mark the next argument as escaping:</p>
  
  <pre><code>func schedule(block: @escaping (@escaping () -&gt; ()) -&gt; ()) {
  </code></pre>
  
  <p>But now the compiler seems to be mistakenly mark the <code>block</code> as non-escaping:</p>
  
  <pre><code>main.swift:9:21: error: using non-escaping parameter 'block' in a context expecting an @escaping closure
          jobs.append(block)
                      ^
  main.swift:8:19: note: parameter 'block' is implicitly non-escaping
      func schedule(block: @escaping (@escaping () -&gt; ()) -&gt; ()) {
                    ^
                           @escaping
  </code></pre>
  
  <p>Is this a known compiler issue?
  Are there workarounds?</p>