Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom matcher won't compile #914

Closed
drekka opened this issue Jun 9, 2021 · 5 comments · Fixed by #965
Closed

Custom matcher won't compile #914

drekka opened this issue Jun 9, 2021 · 5 comments · Fixed by #965

Comments

@drekka
Copy link

drekka commented Jun 9, 2021

I've checked out the main branch (via Swift package in Xcode 12.5 beta) and trying to use a custom matcher like this

expect {
            guard case StateMachineError.illegalTransition = error else {
                return .failed(reason: "Incorrect error")
            }
            return .succeeded
        }.to(succeed())

But it won't compile (Nor will it in the release Xcode when I initially tried it using Carthage to include Nimble).

Screen Shot 2021-06-09 at 22 47 37

Any idea what I've done wrong?

@VerticalHeretic
Copy link

Same in my case, cannot compile after updating Nimble from 8.0.2 to latest

@drekka
Copy link
Author

drekka commented Jun 16, 2021

Solved it. Don't have the code available but I think I converted the responses to closures. ie return { .succeed() } instead of return .succceed().

@VerticalHeretic
Copy link

@drekka Yeah it helper, apparently right now it returns closure ;) thanks for the tip I think we can close this issue

@phlippieb
Copy link

The readme should probably be updated to show compiling code before this issue is closed, no? I'd submit a PR, but I don't understand the reasoning behind the change, so someone who does should probably take that on.

@ikesyo
Copy link
Member

ikesyo commented Feb 25, 2022

ref: #963

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants