Generic parameter 'Result' could not be inferred #28
-
I have the following:
I'm getting a compile error |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@kgrigsby59 extension SpotlightClient {
public static let unimplemented = Self(
- refreshSpotlightIndex: { XCTUnimplemented("\(Self.self).refreshSpotlightIndex") }
+ refreshSpotlightIndex: XCTUnimplemented("\(Self.self).refreshSpotlightIndex")
)
} Basically, call |
Beta Was this translation helpful? Give feedback.
@kgrigsby59
XCTUnimplemented
is meant as a dependency "generator" of sorts, so it's responsible for emitting a function that will fail when called later (as opposed toXCTFail
, which fails immediately when called). I think you can do the following to get things building:Basically, call
XCTUnimplemented
in place of the endpoint's closure, not within the endpoint's closure.