我正在學習Scala,並在本書的源代碼中找到了此代碼,但在本書中沒有對此進行實際解釋。爲了簡單起見,我刪除了詳細信息。有人可以解釋這個Scala代碼嗎?
trait RefModel {
type Instrument = String
type Account = String
}
trait ExecutionModel {this: RefModel =>
case class Execution(account: Account, instrument: Instrument)
}
我想知道這this: RefModel =>
是什麼,這是假設做什麼。