当我编译下面的代码时,编译器抛出错误:
错误:(6,7)在特质容器中,多个重载的替代品 方法寄存器定义默认参数。
def register[A, B <: A](sygnature: Class[A], target: Class[B], lifeTime: LifeTime = Transistent): Unit
def register[A, B <: A](sygnature: Class[A], inject: () => B, lifeTime: LifeTime = Transistent): Unit
我看到带参数的方法(Class [A],Class [B],LifeTime)和(Class [A],Function [B],LifeTime)
我不明白为什么编码器失败