You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SR-13637 Poor error message for closure capture list without in
Issue Description:
Here are two small examples:
classXUEntityProperty<EntityType>:NSObject{}classXUPrimitiveValueProperty<EntityType:NSObject,ValueType>:XUEntityProperty<EntityType>{}classXUArrayProperty<EntityType:NSObject,ItemType:NSObject>:XUPrimitiveValueProperty<EntityType,Array<ItemType>>{// Error: 'unowned' may only be applied to class and class-bound protocol// types, not '(XUArrayProperty<EntityType, ItemType>) -> () -> // XUArrayProperty<EntityType, ItemType>'varvalidator:((EntityType,ItemType)->Bool)={[unowned self](_, _)->Boolinreturn true
}}
classFoo{// Error: Use of unresolved identifier 'self'varvalidator:()->Bool={[unowned self]inreturn true
}}
In both cases the issue is referencing self - using lazy for the var field fixes the issue, but the error messages are nonetheless a bit confusing, mainly the first one, claiming that unowned may be only be used with classes and class-bound protocols...
The text was updated successfully, but these errors were encountered:
Additional Detail from JIRA
md5: bda41c07b5f860532f28f58efa76df5b
relates to:
in
Issue Description:
Here are two small examples:
In both cases the issue is referencing
self
- usinglazy
for thevar
field fixes the issue, but the error messages are nonetheless a bit confusing, mainly the first one, claiming thatunowned
may be only be used with classes and class-bound protocols...The text was updated successfully, but these errors were encountered: