Created
January 17, 2018 09:37
-
-
Save ukitaka/ff95b1ace52df808ef881b4a177ca6be 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
typealias Int = MyInt | |
struct MyInt: ExpressibleByIntegerLiteral, Equatable { | |
typealias IntegerLiteralType = Swift.Int | |
let value: Swift.Int | |
init(integerLiteral value: Swift.Int) { | |
self.value = value | |
} | |
static func ==(lhs: MyInt, rhs: MyInt) -> Bool { | |
return true | |
} | |
} | |
// ------- | |
var a: Int = 1 | |
if a == 1 && a == 2 && a == 3 { | |
print("It works!!") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment