Uploaded image for project: 'Swift'
  1. Swift
  2. SR-6705

Symbol with the name of the module overrides module namespace

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Medium
    • Resolution: Duplicate
    • Component/s: Compiler
    • Labels:
      None
    • Environment:

      Version 9.2 (9C40b)

      Swift 4.0.3

      Description

      Let's say I have an Objective-C TestModule that exports TestModule type (the same name). Now I import it to Swift project and want to use it with the TestModule namespace eg.

      TestModule.Foo is a class from TestModule. I can use it without specifying the module namespace so Foo will work, but call to TestModule.Foo results in an error that Foo is not a member of TestModule. 

      I could import just this type specifying type:

      import class TestModule.Foo

      and that'd work, except when I just import the whole module

      import TestModule

      in this case (the most common case I'd say) I don't have a syntax to specify a call to TestModule.Foo properly.

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                krzyzanowskim Marcin Krzyzanowski
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: