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

ClangImporter ignore aliased Objective-C type name

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Component/s: Compiler
    • Labels:
    • Environment:

      Swift 4.0.3. Xcode 9.2

      Description

      When importing Objective-C function signature with basic primitive type aliased with the typedef, the function is imported with the aliased type name, not with the used alias:

      Objective-C

      typedef NSUInteger PageIndex;
      
      - (nullable NSURL *)pathForPageAtIndex:(PageIndex)pageIndex;
      

      Swift

      func pathForPage(at pageIndex: UInt) -> URL?
      

       
      Expected behavior:

      func pathForPage(at pageIndex: PageIndex) -> URL?

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated: