Scala getter/setter accurate type and definition