I have the following classes:
abstract class Base {
type T
def myMethod: T
}
abstract class B extends Base {
type T <: String
}
abstract class C extends Base {
type T <: Int
}
Now, if i write this:
class Test{
self: B with C =>
// do sth with myMethod
}
myMethod will result in sth of type Int. If, on the other hand, I write this:
class Test{
self: C with B =>
// do sth with myMethod
}
I will get type String. Can someone explain that?