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

"'XMLElement' is ambiguous for type lookup in this context" when compiling for Mac Catalyst #256

Closed
GerdC opened this issue Mar 12, 2022 · 3 comments

Comments

@GerdC
Copy link

GerdC commented Mar 12, 2022

Describe the bug
Compiler complains about "'XMLElement' is ambiguous for type lookup in this context" when compiling for Mac Catalyst

To Reproduce
Steps to reproduce the behavior:

  • In an iOS project target, enable Mac Catalyst
  • Compile code that uses XMLElement

Expected behavior
compiles without error message

Environment:

  • Xcode version: 13.2.1
  • OS running SWXMLHash: MacOS 12.2.1 running Xcode

Additional context
appears to be a known problem when directly compiling for MacOs. XMLElement Sourcecode says
// Workaround for "'XMLElement' is ambiguous for type lookup in this context" error on macOS.

@drmohundro
Copy link
Owner

Confirmed - I put together a quick repro of it up at https://github.com/drmohundro/swxmlhash-test-xmlelement-catalyst-repro.

That being said, it is possible to get around it by scoping the XMLElement with SWXMLHash.XMLElement. See drmohundro/swxmlhash-test-xmlelement-catalyst-repro@07bad9d - that compiles for me.

Does that solve your issue?

@GerdC
Copy link
Author

GerdC commented Mar 13, 2022

Yes, replacing XMLElement with SWXMLHash.XMLElement works for me

@drmohundro
Copy link
Owner

Great! I'll close this as the only alternative I'm aware of would be a rename... and there have already been multiple renames! (#140, #242).

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

2 participants