AST changes to support optional type annotations for collection expressions
Summary:
The front end work to support optional explicit type annotations for stuff like `vec<string>[...]`.
The typechecking algorithm performs super-linearly when trying to infer the unification of things that are slightly different. Usually this isn't a problem because there are only a few things to unify. But sometimes there are more than a few things to unify... like what happens when a collection expression contains many subtypes of a common base. In some real world cases, this prevents the algorithm from finishing in a practical timeframe.
While people work to fix the super-linearity problem, allowing type hints for collection expressions should provide a work-around.
Reviewed By: oulgen
Differential Revision:
D14093176
fbshipit-source-id:
f81bad3ffca599df0b8133ed29581c3ee34c2b64