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

Refactoring: Local rename fails when invoked on type parameter used as the base of an initializer call

    XMLWordPrintable

    Details

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

      Xcode 10 beta 6 with August 14 swift.org dev toolchain

      Description

      Reproducer 1:

      public protocol Mappable {
          init(map: String)
      }
      
      func foo<T>(x: T) where T: Mappable {
        /*try to rename T from here:*/T(map: "")
      }
      

      Reproducer 2:

      extension Array where Element: FixedWidthInteger {
        mutating func blah() {
          typealias Word = Element
          self.append(/*try to rename Word from here:*/Word())
        }
      }
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              nathawes Nathan Hawes
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: