I have a simple example that seems like it should work:
import CoreData @objc protocol CoreDataModel { @optional class func entityName() -> String }
From "The Swift Programming Language"
Because T is a placeholder, Swift does not look for an actual type called T.
As T is not a real type, it is maybe not useful to cast to T.