Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
struct Foo: ExpressibleByBooleanLiteral {
var value: Bool
init(booleanLiteral value: BooleanLiteralType) {
self.value = value
func ==(lhs: Foo, rhs: Foo) -> Bool {
return lhs.value == rhs.value
let x = Foo(booleanLiteral: true)
if x == true {
} else {

This comment has been minimized.

Copy link
Owner Author

DivineDominion commented May 3, 2018

prints "true" :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.