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

Failed to infer generic type parameter in Xcode 9.3 beta 3

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Done
    • Component/s: Compiler
    • Environment:

      Xcode Version 9.3 beta 3 (9Q117m)
      macOS High Sierra Version 10.13.3 (17D47)

      Description

      To reproduce:

      git clone https://github.com/Thomvis/BrightFutures
      cd BrightFutures
      carthage bootstrap --no-build
      xcodebuild -workspace BrightFutures.xcworkspace -scheme BrightFutures-iOS
      

      Error message:

      .../Thomvis/BrightFutures/Sources/BrightFutures/Result+BrightFutures.swift:51:21: warning: result of call is unused, but produces '_'
                          complete(res.analysis(ifSuccess: {
                          ^       ~~~~~~~~~~~~~~~~~~~~~~~~~~
      .../Thomvis/BrightFutures/Sources/BrightFutures/Result+BrightFutures.swift:48:16: error: generic parameter 'T' could not be inferred
              return Future { complete in
                     ^
      .../Thomvis/BrightFutures/Sources/BrightFutures/Future.swift:34:20: note: 'T' declared as parameter to type 'Future'
      public final class Future<T, E: Error>: Async<Result<T, E>> {
                         ^
      .../Thomvis/BrightFutures/Sources/BrightFutures/Result+BrightFutures.swift:48:16: note: explicitly specify the generic arguments to fix this issue
              return Future { complete in
                     ^
                           <Any, <#E: Error#>>
      

        Attachments

          Activity

            People

            Assignee:
            sharplet Adam Sharp
            Reporter:
            sharplet Adam Sharp
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: