drmohundro / SWXMLHash

Simple XML parsing in Swift
MIT License
1.41k stars 205 forks source link

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

Closed GerdC closed 2 years ago

GerdC commented 2 years ago

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:

Expected behavior compiles without error message

Environment:

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 commented 2 years ago

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 https://github.com/drmohundro/swxmlhash-test-xmlelement-catalyst-repro/commit/07bad9daf75a469f3b9cb96b57ce6c4473172bcd - that compiles for me.

Does that solve your issue?

GerdC commented 2 years ago

Yes, replacing XMLElement with SWXMLHash.XMLElement works for me

drmohundro commented 2 years ago

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).