Akos Komuves
Akos Komuves

Reputation: 86

Cleanse build failed on xcode 9

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

Answers (2)

Akos Komuves
Akos Komuves

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

user8824091
user8824091

Reputation:

The syntax seems to have changed

func configure<B : Binder>(binder binder: B) {
       // Will fill out contents later
   }

https://github.com/square/Cleanse

Upvotes: 0

Related Questions