title: If let not still giving "Optional must be unwrapped" error
body: <p>Here is my struct:</p>
  <pre><code>struct EditableCircleImage: View {
  
      @State private var image: Image?
      @State private var inputImage: UIImage?
      @State private var animatedImage: AnimatedImage?
  
      var body: some View {
          ZStack {
          ...
          }
              
      }
      func loadImage() {
          guard let img = inputImage else {
              return
          }
          animatedImage = AnimatedImage(data: img.jpegData(compressionQuality: .infinity))
      }
  }
  </code></pre>
  <p>My <code>animatedImage</code> assignment in <code>loadImage()</code> is giving the following error:</p>
  <pre><code>Value of optional type 'Data?' must be unwrapped to a value of type 'Data'
  </code></pre>
  <p>even though <code>img</code> is guaranteed to not be <code>null</code> as it is created from a <code>guard let</code>.</p>
  <p>I also tested <code>if let inputImage = inputImage</code> and it gives the same error.</p>
  <p>Any idea why?</p>