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

Invalid Redeclaration of ~ operator #276

Open
axandreo opened this issue Nov 10, 2017 · 11 comments
Open

Invalid Redeclaration of ~ operator #276

axandreo opened this issue Nov 10, 2017 · 11 comments

Comments

@axandreo
Copy link

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?

@zackshapiro
Copy link

I also get this error

@orta
Copy link
Collaborator

orta commented Nov 15, 2017

Want to take a look at debugging this?

@zackshapiro
Copy link

I solved this by downgrading from 3.0 but obviously that's not the ideal solution

@franciscoamado
Copy link

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 ¯_(ツ)_/¯

@follyxing
Copy link

+1 swift 3.2

rodericj added a commit to ThumbWorks/Cartography that referenced this issue Nov 21, 2017
@rodericj
Copy link

rodericj commented Nov 21, 2017

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)

corujautx added a commit to corujautx/Cartography that referenced this issue Nov 22, 2017
This should fix the issue reported in robb#276
@corujautx
Copy link
Contributor

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

@ajself
Copy link

ajself commented Dec 7, 2017

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.

@alexbartisro
Copy link

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

@corujautx
Copy link
Contributor

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

@huang1988519
Copy link

Versioning
For Swift 3.x: Versions <= 1.1.0

For Swift 4.x: Versions >= 2.0.0

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

No branches or pull requests

10 participants