Here is a trivialized example of my problem:
class Test: NSObject {
func metaHandler(name elementName: String, attributes attr : NSDictionary) -> NSNumber
{
return NSNumber.init()
}
var metaHandlerFunc: ((String, NSDictionary) -> NSNumber) = metaHandler
}
I get a compiler error when I assign the function to the var:
Cannot convert value of type '(Test) -> (String, NSDictionary) -> NSNumber' to specified type '(String, NSDictionary) -> NSNumber'
My example seems to be exactly what I have seen illustrated elsewhere. Any suggestions?
I'm running Xcode 10.3.