Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adopted == in favour of isEqual(to:) #2730

Closed
wants to merge 6 commits into from
Closed

Adopted == in favour of isEqual(to:) #2730

wants to merge 6 commits into from

Commits on Aug 18, 2017

  1. Adopted == in favour of isEqual(to:)

    Moved `public func ==(_:_:) -> Bool` into type extensions as static functions to properly adopt the `Equatable` protocol.
    All instances of `isEqual(to:)` have been replaced with `==`, but the `isEqual(to:)` methods remain for compatibility with objective-c
    jacobchristie committed Aug 18, 2017
    Configuration menu
    Copy the full SHA
    696e999 View commit details
    Browse the repository at this point in the history

Commits on Aug 21, 2017

  1. data is now properly tested for equality in ChartDataEntry

    jacobchristie committed Aug 21, 2017
    Configuration menu
    Copy the full SHA
    ed74674 View commit details
    Browse the repository at this point in the history
  2. ChartDataEntryBase also test equality properly now.

    jacobchristie committed Aug 21, 2017
    Configuration menu
    Copy the full SHA
    ea19ae4 View commit details
    Browse the repository at this point in the history

Commits on Nov 14, 2017

  1. Added Equatable tests

    jjatie committed Nov 14, 2017
    Configuration menu
    Copy the full SHA
    04843e1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    09a53a7 View commit details
    Browse the repository at this point in the history
  3. Removed == in favour of isEqual

    According to [Apple](https://developer.apple.com/library/content/documentation/Swift/Conceptual/BuildingCocoaApps/InteractingWithObjective-CAPIs.html#//apple_ref/doc/uid/TP40014216-CH4-ID35)
    >Swift provides default implementations of the == and === operators and adopts the Equatable protocol for objects that derive from the NSObject class. The default implementation of the == operator invokes the isEqual: method, and the default implementation of the === operator checks pointer equality. You should not override the equality or identity operators for types imported from Objective-C.
    jjatie committed Nov 14, 2017
    Configuration menu
    Copy the full SHA
    c83e3ea View commit details
    Browse the repository at this point in the history