我有以下课程:
abstract class Base {
  type T
  def myMethod: T
}
abstract class B extends Base {
  type T <: String
}
abstract class C extends Base {
  type T <: Int
}
现在,如果我写这个:
class Test{
    self: B with C => 
    // do sth with myMethod
}
myMethod 将导致 Int 类型的某事。另一方面,如果我这样写:
class Test{
    self: C with B => 
    // do sth with myMethod
}
我会得到类型字符串。有人可以解释一下吗?