func change(list:AnyObject) -> Bool {
if let list = list as? List {
return true
} else {
return false
}
}
let list = List<BDRUser>()
list.append(BDRUser())
print(change(list))
let list = List<BDRUser>()
list.append(BDRUser())
let v = list as? List<Object>
print(v)
the result is 'nil'
I wonder why type casting doesn't work well from List<BDRUser> to List<Object> ? That is always fail
so could you fix it though?
Thanks !
--
You received this message because you are subscribed to the Google Groups "Realm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to realm-cocoa...@googlegroups.com.
To post to this group, send email to realm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/realm-cocoa/cf3b2177-5d9f-4cf3-822d-41b3ec07bb91%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.