Reputation: 86
I try to build my legacy code on xcode 9, swift version 3.2 with the Cleanse dependency injector, but the static func configure<B: Binder>(binder: Binder)
function got the following error:
Reference to generic type 'Binder' requires arguments in <...>
I tried all the branches and commits. What do you recommend?
Upvotes: 0
Views: 148
Reputation: 86
The correct syntax is the following:
struct Singleton : Scope {
}
static func configure(binder: Binder<Singleton>) {
// Will fill out contents later
}
You can check an example here: https://github.com/square/Cleanse/blob/master/CleansePlayground.playground/Pages/CoffeeMakerExample.xcplaygroundpage/Contents.swift
Upvotes: 0
Reputation:
The syntax seems to have changed
func configure<B : Binder>(binder binder: B) { // Will fill out contents later }
Upvotes: 0