Invalid Redeclaration of ~ operator
axandreo opened this issue ยท 11 comments
I install Cartography, and then try to build my project. However I could not build because Xcode considered the operator overloads of ~
to be an invalid redeclaration.
I forked and built Cartography to see if the compile error would appear in the Cartography workspace but it didn't. For some reason Xcode doesn't allow the operator overloads of ~
in my project. This is in Priority.swift. Any thoughts as to why?
I also get this error
Want to take a look at debugging this?
I solved this by downgrading from 3.0 but obviously that's not the ideal solution
I also got this error but it is an intermittent problem..
Downgrading to 2.1.0, running pod install --repo-update
and bumping again to 3.0 seemed to fix the problem ๐
I've looked into the method definition in Priority.swift
and everything looks fine ยฏ_(ใ)_/ยฏ
+1 swift 3.2
I was able to get around this by cloning the repo, deleting one of the duplicate definitions of ~
and replacing another duplicate definition of ~
with ~~
. This is not an elegant solution and isn't going into production for me. I'm definitely open to discussing a proper solution.
Swift 3.2
Xcode Version 9.1 (9B55)
I fixed that on my fork but I want to add more things before opening a PR to 3.0.2 as I recently opened the 3.0.1 PR.
Please see discussion in #277
I was able to fix this by choosing the Pods project in the work space, selecting the Cartography target, selecting Build Settings, and changing Swift Language Version to Swift 4.0. This isn't a permanent fix but did allow me to move on in the meantime.
I also have this fix, and as a workaround I went and set the pod swift version to 4.0 manually, but it's not a long term solution
The fix I provided in my fork should work without problems for users of Swift 3.2, so you don't need to manually change that.
Please check @ https://github.com/corujautx/Cartography
Versioning
For Swift 3.x: Versions <= 1.1.0
For Swift 4.x: Versions >= 2.0.0