title: Swift Value of type "ViewController" has no member named "Self" error
body: <p>I am trying to understand trailing edge closures in Swift, and this code gives me an error in the <code>promptForAnswer()</code>. Specifically, I am getting an Xcode error which says: </p>
  
  <blockquote>
    <p>Value of type "ViewController" has no member named "Self"</p>
  </blockquote>
  
  <p>...even though I have declared it in the code.</p>
  
  <p>Can someone explain what is wrong?</p>
  
  <pre><code>import UIKit
  import GameplayKit
  
  var allWords = [String]()
  var usedWords = [String]()
  
  class ViewController: UITableViewController {
  
      override func viewDidLoad() {
          super.viewDidLoad()
  
          navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .add, target: self, action: #selector(promptForAnswer))
  
          if let startWordsPath = Bundle.main.path(forResource: "start", ofType: "txt") {
              if let startWords = try? String(contentsOfFile: startWordsPath) {
                  allWords = startWords.components(separatedBy: "\n")
              }
          } else {
              allWords = ["silkworm"]
          }
          startGame()
      }
  
      @objc func promptForAnswer() {
          let ac = UIAlertController(title: "Enter answer", message: nil, preferredStyle: .alert)
          ac.addTextField()
  
          let submitAction = UIAlertAction(title: "Submit", style: .default) {
              [unowned self, ac] (action: UIAlertAction) in
              let answer = ac.textFields![0]
              self.submit(answer: answer.text!) // Value of type "ViewController" has no member type "self"
          }
  
          ac.addAction(submitAction)
          present(ac, animated: true)
      }
  
      func startGame() {
          allWords = GKRandomSource.sharedRandom().arrayByShufflingObjects(in: allWords) as! [String]
          title = allWords[0]
          usedWords.removeAll(keepingCapacity: true)
          tableView.reloadData()
      }
  
      override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
          return usedWords.count
      }
  
      override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
          let cell = tableView.dequeueReusableCell(withIdentifier: "Word", for: indexPath)
          cell.textLabel?.text = usedWords[indexPath.row]
          return cell
      }
  
      override func didReceiveMemoryWarning() {
          super.didReceiveMemoryWarning()
          // Dispose of any resources that can be recreated.
      }
  }
  </code></pre>