realm/realm-cocoa — pull request #678 by Reflejo (2014-07-25 21:32:55+00:00)
Title: When ignoredProperties is overridden on Swift, the schema ends up invalid

When overridden ignoredProperties on an RLMObject subclass (Swift), the entire schema gets invalid (it ends up with 0 properties). The reason why this is happening is, to say at least, tricky:

I'm unclear if this is a Swift bug or just an intended language "feature". But when the conditional includes an unwrapping and a method call, only the unwrapping gets evaluated. Meaning that when you do:

```
ignoredPropertiesForClass?.containsObject(propertyName)
```

If ignoredPropertiesForClass is not nil, it doesn't matter what the containsObject method returns, that conditional is always going to be true. *Note that I only tested this on Xcode Beta4.*