Skip to content

Instantly share code, notes, and snippets.

@cgoldsby
Last active September 5, 2015 11:32
Show Gist options
  • Save cgoldsby/b4f8a8ccf8550ffbd1a1 to your computer and use it in GitHub Desktop.
Save cgoldsby/b4f8a8ccf8550ffbd1a1 to your computer and use it in GitHub Desktop.
MakeItCompileChallenge Challenge #4
// 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