A def can be implemented by either of a def, a val, a lazy val or an object. So it's the most abstract form of defining a member. Since traits are usually abstract interfaces, saying you want a val is saying how the implementation should do. If you ask for a val(the same is for a var), an implementing class cannot use a def.
Ввійдіть щоб вподобати
Ввійдіть щоб прокоментувати