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

Function Builders & Opaque return types error Xcode 11 / Swift 5.1

    XMLWordPrintable

    Details

      Description

      When using a function builder in combination with an opaque return type, I get the following error:

      Cannot convert return expression of type 'Commands' to return type 'some Commands'

      From what I read of this error, `Commands` should definitely be convertible to `some Commands`, but to be sure I also tested with a scenario where my functionBuilder instead of `Commands` would return a type conforming to `Commands` resulting in the same error.

      You can find the sourcecode (GH gist) here: https://gist.github.com/MrLotU/a3ec8857871ee516a5bd36227976c7e7

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              MrLotU Jari Koopman
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: