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

Namespace collision with SwiftUI 'View' #349

Open
brzzdev opened this issue Mar 8, 2023 · 1 comment
Open

Namespace collision with SwiftUI 'View' #349

brzzdev opened this issue Mar 8, 2023 · 1 comment

Comments

@brzzdev
Copy link

brzzdev commented Mar 8, 2023

public typealias View = UIView

public typealias View = NSView

causes 'View' is ambiguous for type lookup in this context when using Cartography in the same file as a SwiftUI View. For example, with HostingViews.

It can be fixed by specifying SwiftUI.View and var body: some SwiftUI.View, but seems best to avoid clashing with built-in types.

@brzzdev
Copy link
Author

brzzdev commented Oct 5, 2023

Also collides with Context from both UIViewRepresentable and NSViewRepresentable

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

1 participant