Page MenuHomePhabricator

remove @move from get { } if ownership is not moved by getter
Closed, ResolvedPublic

Description

@move in eo indicates that the ownership is moved.

If @move is set to @property's values, then @move is applied to both setter and getter.

However, most of getters with @move does not pass the ownership. Instead, most of getters simple return the property handle. (not symmetrical behavior)

To keep the consistency, if getter does not pass the ownership, then @move should be applied to setter only as follows.

@property example {
   set {
      values {
         example : type @move;
      }
   }
   get {
      values {
         example : type;
      }
   }
}