|
Swift code:
|
# ¿ Jun 4, 2017 07:12 |
|
|
# ¿ May 14, 2024 00:51 |
|
It's "conditional conformances". We intended to implement it in Swift 4 and didn't quite finish. It'll probably be in 4.1.
|
# ¿ Jun 29, 2017 01:48 |
|
Also stop making things optional for no reason.
|
# ¿ Jul 5, 2017 23:28 |
|
Yeah, you can still do it with optionals, it just turns it from usa.states.flatMap { $0.cities } into something a little more complex/obscure. But you should also be able to just declare the properties to be nonnull. IIRC, if you do that the bridging logic will automatically turn an unexpected nil return into an empty array.
|
# ¿ Jul 6, 2017 17:30 |