Created
November 2, 2015 20:54
-
-
Save dwaite/845b11b967cda9b1f1a5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import Foundation | |
public class Foo : NSObject {} | |
public class Bar : NSObject {} | |
public func ==(lhs:Bar, rhs:Bar) -> Bool {return true} | |
Foo() == Foo() // NSObject variant - false | |
Bar() == Bar() // our variant - true | |
Bar() as NSObject == Bar() as NSObject // our variant is ignored - false! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment