title: Can I force evaluation of an @autoclosure parameter?
body: <p>Consider code like this:</p>
  
  <pre><code>func log(_ msg: @autoclosure @escaping () -&gt; Any?) {
      print(msg)
  }
  
  class Foo {
      let bar = 3
      let lazy: String
  
      init() {
          log("bar is \(self.bar)")
          self.lazy = "always late"
      }
  }
  </code></pre>
  
  <p>This does not compile:</p>
  
  <blockquote>
    <p>Error: 'self' captured by a closure before all members were initialized</p>
  </blockquote>
  
  <p>Fair enough: even though there clearly is no problem here, the compiler can't be expected to figure out that (arbitrary) closures don't use <code>self</code> in ways that are undefined (yet).</p>
  
  <p>Of course, I can work around this by doing:</p>
  
  <pre><code>let bar = self.bar
  log("bar is \(bar)")
  </code></pre>
  
  <p>But this seems clumsy.</p>
  
  <p>Is there a way to tell the Swift compiler to evaluate the <code>@autoclosure</code>-parameter upfront, that is in essence to ignore <code>@autoclosure</code>?</p>
  
  <p>PS: I copied this signature from XCGLogger. I'm not sure why <code>@autoclosure</code> is needed there.</p>