我在
Scala REPL中收到以下错误:
scala> trait Foo[T] { def foo[T]:T } defined trait Foo scala> object FooInt extends Foo[Int] { def foo[Int] = 0 } <console>:8: error: type mismatch; found : scala.Int(0) required: Int object FooInt extends Foo[Int] { def foo[Int] = 0 } ^
我想知道它究竟意味着什么,以及如何解决它.