title: Unable to infer closure type in the current context
body: <p>On the 3rd line in the function below I get the following error:</p>
  
  <blockquote>
    <p>Unable to infer closure type in the current context</p>
  </blockquote>
  
  <p>How do I fix this?</p>
  
  <pre><code>func fetchAllUsersImages() {
      print("inside func")
      self.ref.child("Posts").child(self.userID).child(self.postNum).observe(.childAdded, with: { snapshot in //error here
  
          var images: [URL] = []
          if let snapShotValue = snapshot.value as? [String: String] {
  
              for (_, value) in snapShotValue {
                  if let imageURL = URL(string: value) {
                      print(imageURL, "image url here")
                      let imageAsData = try Data(contentsOf: imageURL)
                      let image = UIImage(data: imageAsData)
                      let ImageObject = Image()
                      ImageObject.image = image
                      self.arrayOfImgObj.append(ImageObject)
                      self.tableView.reloadData()
                  }
              }
          }
      })
  }
  </code></pre>