ios - Cannot specialize non-generic type 'Set' -


this nsmanagedobject:

@objc(order) class order: nsmanagedobject {      @nsmanaged var orderitems: set<orderitem> //error: cannot specialize non-generic type 'set' } 

anyone know why doesnt work?

orderitem file created , works following declaration:

@nsmanaged var orderitem: orderitem 

just reference if should come question in future nasty bug, since discussion went on in comments.

yes, default set type in swift generic, in case custom non-generic set class shadowing class defined language's standard library.

better choose different names classes, avoid name clashes. if needed, can use qualified name of classes refer class want.

standard language classes available under swift. namespace, while other classes can use name of module followed dot , name of class (e.g. foundation.nsstring).


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -