While refactoring from Objective-C to Swift we came across this old piece of code with the following if statement:
if (![CNContactStore class]) {
// do stuff
}
How can a type be used as a boolean expression? I have no idea what's going on here. I'm amazed it even compiles.