Pessimize get and set on object and class properties
Summary:
The easiest way to explain this diff is by example. We consider property access and assignment on unenforceable types to be operating on like types. So:
```
class C {
public shape('a' => int) $mem = shape('a' => 4);
public static shape('a' => int) $stat_mem = shape('a' => 4);
}
```
is treated implicitly as
```
class C {
private shape('a' => int) $mem = shape('a' => 4);
private static shape('a' => int) $stat_mem = shape('a' => 4);
public function get_mem(): shape('a' => int) { return $this->mem; }
public function set_mem(shape('a' => int) $s): { $this->mem = $s; }
public static function get_static_mem(): shape('a' => int) { return self::$static_mem; }
public static function set_static_mem(shape('a' => int) $s): { self::$static_mem = $s; }
}
```
and then the get/set methods are pessimized to
```
class C {
...
public function get_mem(): ~shape('a' => int) { ... }
public function set_mem(~shape('a' => int) $s): { ... }
public static function get_static_mem(): ~shape('a' => int) { ... }
public static function set_static_mem(~shape('a' => int) $s): { ... }
}
```
The end result is that unenforced properties are retrieved as like types, and it is now possible to write `dynamic` into unenforced properties.
Reviewed By: Matt-Schellhas
Differential Revision:
D16906171
fbshipit-source-id:
901d102dd3aa2f4bd29ae0f65f10eb8f0ccb1b99