Swift Command failed due to signal: Segmentation fault: 11 -
here code:
func cache<t: cacheable>(type: int, items: array<t>, options: cacheoptions?) { log(log_http, "caching ... \(items)") item: cacheable in items { let key: string? = item.primarykeyvalue() } }
it's pretty simple, cacheable protocol:
public protocol cacheable: class { func primarykeyvalue() -> string? }
and compile fails signal issue. if remove :class cacheable, compile go through, when need:
nscache().setobject(item, forkey: "key")
it complains cacheable not conform anyobject protocol, stuck here. help? thanks.
Comments
Post a Comment