我正在遵循Scaldi 文档中提到的步骤。以下是我的代码。
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])
}
}
我收到以下编译错误。
Error:(11, 49) not found: value inject
this(players, currentPlayer, board, active, inject[GamePersistor])
^
有人可以帮我解决这个问题吗?