title: How to access an actor-isolated property
body: <p>I try to check the actor's behavior. This is a new feature provided by Swift5.5.</p>
  <p>I've created a playground with an example code from the official documentation <a href="https://docs.swift.org/swift-book/LanguageGuide/Concurrency.html" rel="noreferrer">swift.org</a>:</p>
  <pre class="lang-swift prettyprint-override"><code>    import Foundation
      
      actor TemperatureLogger {
          let label: String
          var measurements: [Int]
          private(set) var max: Int
  
          init(label: String, measurement: Int) {
              self.label = label
              self.measurements = [measurement]
              self.max = measurement
          }
      }
  
      let logger = TemperatureLogger(label: &quot;Outdoors&quot;, measurement: 25)
      print(await logger.max)
      // Prints &quot;25&quot;
  
  </code></pre>
  <p>But my compiler fails on this example:</p>
  <p><a href="https://i.stack.imgur.com/xBk9e.png" rel="noreferrer"><img src="https://i.stack.imgur.com/xBk9e.png" alt="errors" /></a></p>
  <blockquote>
  <p>Swift Compiler Error:</p>
  <p>'await' in a function that does not support concurrency</p>
  <p>Actor-isolated property 'max' can only be referenced from inside the actor</p>
  </blockquote>
  <p>So how to access an actor-isolated property?</p>
  <p>Maybe it's a bug in the compiler or in the example code?</p>
  <p>Xcode Version 13.0 beta (13A5154h)
  Swift Version 5.5</p>