Created
May 19, 2022 15:25
-
-
Save lazyvar/0c59567104cb9875dd7135bbb8f01ae4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Equatable+nil.swift | |
struct Model: Equatable { } | |
let model = Model() | |
print(model == nil) // This compiles and produces a warning | |
print(model == .none) // This compiles with no warning |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I guess synthesized equatable definitions will produce something like this: