Last active
September 5, 2015 11:32
-
-
Save cgoldsby/b4f8a8ccf8550ffbd1a1 to your computer and use it in GitHub Desktop.
MakeItCompileChallenge Challenge #4
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
// I really like this one | |
// XCode 7.0 beta 6 (7A192o) | |
typealias D = NonObjectiveCBase | |
func ~=(left: Any, right: Bool) -> BooleanType { | |
return true | |
} | |
func +(left: Any, right: Any) -> String { | |
return "" | |
} | |
protocol 🐢: class, BooleanType, ArrayLiteralConvertible { | |
var `self` : () -> () { get set } | |
} | |
extension 🐢 { | |
typealias Element = Any | |
internal init(arrayLiteral elements: Any...) { | |
self.init() | |
} | |
// | |
func doIt(inout s: D) { | |
if case self = isUniquelyReferenced(&s), | |
self.`self` = true where self { | |
self.`self` = { [unowned x = [self, 7] as Self] n in | |
print(x + n) | |
} as () -> () | |
} | |
} | |
// | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment