Curious, why I am getting this error:
If I declare that solely objects can conform to the protocol:
public protocol DayViewStateUpdating: AnyObject {
func transfer(from oldDate: Date, to newDate: Date)
}
After which attempting to instantiate an NSHashTable
of that protocol:
non-public var clientsHashTable = NSHashTable<DayViewStateUpdating>.weakObjects()
I am getting the error:
‘NSHashTable’ requires that ‘any DayViewStateUpdating’ be a category sort
However the any DayViewStateUpdating is assured to be a category sort, because it’s declared as AnyObject earlier. Or am I lacking one thing?
Supply code of the file in context: DayViewState