5 Replies
      Latest reply: Feb 2, 2017 6:03 AM by Valerian RSS
      Valerian Level 1 Level 1 (15 points)

        I'm getting an error in our Test target after migrating to swift 3:

         

        error: ambiguous use of 'init(sectionIndex:itemIndex:)'
              ItemPath(sectionIndex: 0, itemIndex: 0),
              ^
        RxDataSources.ItemPath:4:12: note: found this candidate
            public init(sectionIndex: Int, itemIndex: Int)
                   ^
        <unknown>:0: note: found this candidate
        

         

        The use of ItemPath in the main target works fine so it is pretty odd and the unknown second candidate doesn't help solving this.

         

        A similar issue happens with an operator we've declared and used throughout the main target but generates the same "ambiguous" issue in the test target only this time all 2 candidates are unknown...

         

        Has anyone encountered a similar issue ? And found a solution ?

         

        Thanks !

        • Re: Error ambiguous use of 'selector' with unknown candidate
          eskimo Apple Staff Apple Staff (5,995 points)

          Have you tried this with the current Xcode 8.3 beta?  It’d be interesting to see if that does a better job of telling you what’s wrong.

          If the problem reproduces there, it’d be helpful if you could file a bug about this.  Even if this turns out to be a problem with your code, the poor diagnostics could stand some improvement.  It’d be most helpful if you include a project that reproduces the failure.

          Please post your bug number, just for the record.

          As to your actual problem, how is you test target set up?  Are you building a framework and testing that?  Linking the code directly into your test target?  Or having your test target run the code out of your app?

          Share and Enjoy

          Quinn “The Eskimo!”
          Apple Developer Relations, Developer Technical Support, Core OS/Hardware
          let myEmail = "eskimo" + "1" + "@apple.com"