I have updated Nimble from 8.1.2 to 9.0.0.
I have tests with Custom Validation like this
expect({
guard false else { return .failed(reason: "some reason") }
return .succeeded
}).to(succeed())
This test is not compiled. Errors:
Type '(() -> ToSucceedResult)? has no member 'failed'
Type '(() -> ToSucceedResult)? has no member 'succeeded'
At the same time test below is compiled successfully:
expect({
return .succeeded
}).to(succeed())
I suppose it's related to changes in expect... methods signature regarding @autoclosure modifier.
Note:
I have tried to change signature of succeed function.
from:
public func succeed() -> Predicate<() -> ToSucceedResult>
to
public func succeed() -> Predicate<ToSucceedResult>
In this case tests are compiled successfully.
Test is compiled successfully
I've got errors:
Type '(() -> ToSucceedResult)? has no member 'failed'
Type '(() -> ToSucceedResult)? has no member 'succeeded'
List the software versions you're using:
Please also mention which package manager you used and its version. Delete the
other package managers in this list:

Completely similar situation.
Had the same problem, the error msg helps here however.
This works:
expect({
let result: (() -> ToSucceedResult)? = {
guard case let .loaded(questions) = subject.state else {
return .failed(reason: "wrong enum case")
}
if questions == [] {
return .succeeded
} else {
return .failed(reason: "wrong questions")
}
}
return result
}).toEventually(succeed())
It is expected to use trailing closure syntax for the succeed matcher to make type inference work correctly:
expect {
guard false else { return .failed(reason: "some reason") }
return .succeeded
}.to(succeed())
See #809 and #824 for the details.
Most helpful comment
Had the same problem, the error msg helps here however.
This works: