I am following the steps mentioned in Scaldi documentaiton. Following is my code.
class Game(players: List[Player], currentPlayer: Player,
board: Board, active: Boolean, gamePersistor: GamePersistor) extends Injectable {
def this(players: List[Player], currentPlayer: Player,
board: Board, active: Boolean)(implicit inj: Injector) {
this(players, currentPlayer, board, active, inject[GamePersistor])
}
}
I get the following compilation error.
Error:(11, 49) not found: value inject
this(players, currentPlayer, board, active, inject[GamePersistor])
^
Can someone help me solve this issue?
Figured out from the documentation
All forms of inject expect and implicit instance of Injector to be in scope. If
So the code should be