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

swift-ci opened this issue May 3, 2016 · 0 comments


Copy link

@swift-ci 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


  • 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


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

@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
None yet

No branches or pull requests

1 participant