title: Swift error: Reference to generic type Dictionary requires arguments in <...>
body: <p>The error <code>Reference to generic type Dictionary requires arguments in &lt;...&gt;</code> is appearing on the first line of the function. I am trying to have the function return an NSDictionary retrieved from an api. Anyone know what could be going on here?</p>
  
  <pre><code>class func getCurrentWeather(longitude: Float, latitude: Float)-&gt;Dictionary?{
  
  let baseURL = NSURL(string: "https://api.forecast.io/forecast/\(apikey)/")
  let forecastURL = NSURL(string: "\(longitude),\(latitude)", relativeToURL:baseURL)
  
  let sharedSession = NSURLSession.sharedSession()
  let downloadTask: NSURLSessionDownloadTask = sharedSession.downloadTaskWithURL(forecastURL!, completionHandler: { (location: NSURL!, response: NSURLResponse!, error: NSError!) -&gt; Void in
  
      if(error == nil) {
          println(location)
          let dataObject = NSData(contentsOfURL:location!)
          let weatherDictionary: NSDictionary = NSJSONSerialization.JSONObjectWithData(dataObject!, options: nil, error: nil) as NSDictionary
          return weatherDictionary
      }else{
          println("error!")
          return nil
  
      }
  })
  }
  </code></pre>
  
  <p>EDIT:</p>
  
  <p>Second Issue:</p>
  
  <pre><code>    class func getCurrentWeather(longitude: Float, latitude: Float)-&gt;NSDictionary?{
  
      let baseURL = NSURL(string: "https://api.forecast.io/forecast/\(apikey)/")
      let forecastURL = NSURL(string: "\(longitude),\(latitude)", relativeToURL:baseURL)
  
      let sharedSession = NSURLSession.sharedSession()
      let downloadTask: NSURLSessionDownloadTask = sharedSession.downloadTaskWithURL(forecastURL!, completionHandler: { (location: NSURL!, response: NSURLResponse!, error: NSError!) -&gt; Void in
  
          if(error == nil) {
              println(location)
              let dataObject = NSData(contentsOfURL:location!)
              let weatherDictionary: NSDictionary = NSJSONSerialization.JSONObjectWithData(dataObject!, options: nil, error: nil) as NSDictionary
  
  
              return weatherDictionary //ERROR: NSDictionary not convertible to void
  
          }else{
              println("error!")
              return nil ERROR: Type void does not conform to protocol 'NilLiteralConvertible'
  
          }
      })
      }
  </code></pre>