OS X 10.11.4 (15E65), Xcode 7.3, snapshot: swift-DEVELOPMENT-SNAPSHOT-2016-04-25-a.xctoolchain
Additional Detail from JIRA
Votes
0
Component/s
Compiler
Labels
Bug
Assignee
None
Priority
Medium
md5: 0b5c364f6ff522a65100a139bf740e02
duplicates:
SR-898 Unresolvable "ambiguous for type lookup" error when using multiple modules
Issue Description:
Scenario:
importMyFramework// <- has a public struct "A"structA {} // internal to my projectleta = MyFramework.A() // <- Type MyFramework has no member "A"
It seems one can't reference the imported struct of the module MyFramework. If one uses `let a = A()` the internal struct is used (which, of course, makes sense).
The problem here is only a little bit different (the class/struct with the same name as the framework is in another framework, not in the local project as above):
// in framework SomethingpublicstructA {}
publicclassSomething {}
// in framework OtherThingpublicstructA {}
// in the projectimportSomethingimportOtherThingleta = Something.A() // <- "A" is not a member of type "Something"
I have attached a workspace with 2 framework projects and an iOS project that demonstrates the issue.
The text was updated successfully, but these errors were encountered:
Attachment: Download
Environment
OS X 10.11.4 (15E65), Xcode 7.3, snapshot: swift-DEVELOPMENT-SNAPSHOT-2016-04-25-a.xctoolchain
Additional Detail from JIRA
md5: 0b5c364f6ff522a65100a139bf740e02
duplicates:
Issue Description:
Scenario:
It seems one can't reference the imported struct of the module MyFramework. If one uses `let a = A()` the internal struct is used (which, of course, makes sense).
A related issue came up recently on Stackoverflow: http://stackoverflow.com/questions/36991735/how-to-reference-a-type-in-a-module-that-has-a-type-with-the-same-name-as-the-mo
The problem here is only a little bit different (the class/struct with the same name as the framework is in another framework, not in the local project as above):
I have attached a workspace with 2 framework projects and an iOS project that demonstrates the issue.
The text was updated successfully, but these errors were encountered: