Quick / Nimble

A Matcher Framework for Swift and Objective-C
https://quick.github.io/Nimble/documentation/nimble/
Apache License 2.0
4.8k stars 601 forks source link

Fix equal compilation optionals #982

Closed younata closed 2 years ago

younata commented 2 years ago

This extends and solves https://github.com/Quick/Nimble/pull/962 by doing what @ikesyo suggests as the fix.

Another possible fix would be to add public extensions of Array, Set, and Dictionary such that they can also use == or != with Optionals. I elected not to do that because I'd rather not change the behavior of these very common types just for Nimble. It felt way less riskier to bring back these matchers.

Maybe in the future, Swift will be enhanced again so that we can actually simplify these matchers.

Thanks @acecilia for bringing up this issue!