Cannot invoke 'fetch' with an argument list of type '(NSFetchRequest<NSFetchRequestResult>)'
<p>I have created a helper function to load <code>NSManagedObject</code>s using Swift 3, which supports iOS 9.0+. </p>

<pre><code>class func loadContext(entityName: String, fetchConfiguration: ((NSFetchRequest&lt;NSManagedObject&gt;) -&gt; Void)?) -&gt; AnyObject? {
    let appDelegate = UIApplication.shared.delegate as! AppDelegate
    // Fetch requested data
    let dataFetchRequest = NSFetchRequest&lt;NSManagedObject&gt;(entityName: entityName)

    // Configure the fetch request with user parameters
    if fetchConfiguration != nil {
        fetchConfiguration!(dataFetchRequest)
    }

    do {
        return try appDelegate.managedObjectContext.fetch(dataFetchRequest as! NSFetchRequest&lt;NSFetchRequestResult&gt;)
    } catch {
        print("Failed to fetch feed data, critical error: \(error)")
    }

    return nil
}
</code></pre>

<p>However I get the following error:</p>

<p><code>Cannot invoke 'fetch' with an argument list of type '(NSFetchRequest&lt;NSFetchRequestResult&gt;)'</code></p>

<p>I have also tried several variants, such as having <code>let dataFetchRequest = NSFetchRequest&lt;NSFechRequestResult&gt;(entityName: entityName)</code> and they all run into the same error.</p>