Today, the group participants Someone made such a problem,Why use the characteristic dictionary type as a generic type constraint,It will inevitably error?
1 |
inheritance from non-protocol, non-class type 'Dictionary<String, Any>' |
Obviously,He said very clearly,"You can not be from a non-agreement、Non-type class inheritance. "。Obviously,The dictionary is a generic structure...
Then the solution is also very clear ideas,Creating a class to decorate a dictionary might be a good choice but too much trouble,Then start from the agreement。
Conditional agreement to follow
We can give the dictionary[……]