Skip to content
This repository has been archived by the owner on Apr 8, 2023. It is now read-only.

Incompatible with Swift 5 #42

Closed
Rebecca-Qian opened this issue Apr 15, 2019 · 2 comments · Fixed by #43
Closed

Incompatible with Swift 5 #42

Rebecca-Qian opened this issue Apr 15, 2019 · 2 comments · Fixed by #43

Comments

@Rebecca-Qian
Copy link

I am getting a compiler error using Swift 5:

{path to project}/Pods/LocationPickerViewController/LocationPicker/LocationItem.swift:122:24: value of type 'AnyObject' has no member 'hashValue'

This is the function causing problems:

open override func isEqual(_ object: Any?) -> Bool { guard let object = object else { return false } return (object as! NSObject).hashValue == hashValue }

Since this class subclasses from NSObject, can we use the default NSObject isEqual definition instead? Thanks for looking into this.

@edwardmp
Copy link
Contributor

I submitted a PR to fix this. I'm not 100% sure that fix is correct, but it seems so.

@uknowmeright
Copy link

for swift 5 support pull from:

pod 'LocationPickerViewController', :git => 'https://github.com/zhuorantan/LocationPicker.git', :branch => 'master'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants