def not val. You can override def with val, not the other way around. val in trait is dangerous due to the init order bug.