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

[SR-1386] Can't reference a type inside a module that has a type whose name is the same as the module #43995

Closed
swift-ci opened this issue May 3, 2016 · 0 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself feature A feature request or implementation

Comments

@swift-ci
Copy link
Collaborator

swift-ci commented May 3, 2016

Previous ID SR-1386
Radar None
Original Reporter aleph (JIRA User)
Type Bug
Status Resolved
Resolution Duplicate
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, LanguageFeatureRequest
Assignee None
Priority Medium

md5: 39628c9b368c71f4c46461f4114a9aa9

duplicates:

  • SR-898 Unresolvable "ambiguous for type lookup" error when using multiple modules

Issue Description:

In Framework Something

public struct A { ... }
public class Something { ... }

In Framework OtherFramework

public struct A { ... }

Then on the main project import both modules:

import Something
import OtherFramework

let myA = A() // 'A' is ambiguous for type lookup in this context

or

import Something
import OtherFramework

let myA = Something.A() // 'A' is not a member type of 'Something'

There is no way to reference `A` in module `Something`. Except for a couple workarounds, see http://stackoverflow.com/questions/36991735/how-to-reference-a-type-in-a-module-that-has-a-type-with-the-same-name-as-the-mo

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself feature A feature request or implementation
Projects
None yet
Development

No branches or pull requests

1 participant