profile
viewpoint

Ask questionsexpect(_:file:line)/expect(_:line:expression) overload ambiguity in Xcode 12 beta 5

  • [x] I have read CONTRIBUTING and have done my best to follow them.

What did you do?

I tried to compile my project with Xcode 12 beta 5 and got the error at calls like this:

expect {
    try sut.doSomething()
}.to(throwError(expectedError))

I guess this might be related to the new trailing closure syntax in Swift 5.3.

What did you expect to happen?

I expect this code to compile.

What actually happened instead?

The code doesn't compile due to following error: "Ambigous use of expect". The mentioned expect overloads are listed by Xcode as candidates.

Environment

List the software versions you're using:

  • Quick: 3.0.0
  • Nimble: 8.1.1, 9.0.0-rc.1
  • Xcode Version: 12.0 beta 5 (12A8189h) (Open Xcode; In menubar: Xcode > About Xcode)
  • Swift Version: ?.? (Open Xcode Preferences; Components > Toolchains. If none, use Xcode Default.)

Please also mention which package manager you used and its version. Delete the other package managers in this list:

  • Cocoapods: 1.10.0.beta.1

Project that demonstrates the issue

https://github.com/nikolaykasyanov/NimbleCompilationFailure

Quick/Nimble

Answer questions nikolaykasyanov

@ikesyo my bad, thanks for referencing.

useful!
source:https://uonfu.com/
Github User Rank List