Change collecting dependencies of type constants
commit44bc782b01fc64ade09db43b834737481e44015f
authorSasha Manzyuk <manzyuk@fb.com>
Wed, 25 Sep 2019 15:23:21 +0000 (25 08:23 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Wed, 25 Sep 2019 15:26:14 +0000 (25 08:26 -0700)
tree8c6917ee2b0d9589b05613bffdba0a6643872ba7
parentf71c4383288ccac04ab8936e465b4fcc134a9808
Change collecting dependencies of type constants

Summary:
1. We don't need an initializer for type constant, don't try to add a dependency to generate it.
2. Add dependencies on type constant's constraint and type when specified.
3. Don't force get a typeconst. Even though we got a dependency `Const(cls, typeconst)`, `typeconst` might not exist in `cls` if `cls` is a trait.

Example:
```
trait TMy {
  require extends MyAbstract;
  public function routine(): this::MainT {
    ...
  }
}

abstract class MyAbstract {
  abstract const type MainT;
}
```

Reviewed By: CatherineGasnier

Differential Revision: D16939469

fbshipit-source-id: 7a8af6c7d02da4bfe9b3251495aef02421c291c5
hphp/hack/src/server/serverExtractStandalone.ml