Implement naming for unknown shape fields
commit073d47bf795b5cdb5ca538a55b7397c8cceec7a3
authorMichael Tingley <tingley@fb.com>
Wed, 5 Apr 2017 11:43:19 +0000 (5 04:43 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Wed, 5 Apr 2017 12:00:08 +0000 (5 05:00 -0700)
treeb9004ff14fa3974c5350a5bf2b8286a79777a391
parentc2e8e68238487efc1ba83d7dd587d0825587b16a
Implement naming for unknown shape fields

Summary:
Carries shape's unknown fields status through naming.

This introduces the following type:

```name=nast.ml,lang=ocaml
nast_shape_info = {
  nsi_allows_unknown_fields : bool;
  nsi_field_map : shape_field_info ShapeMap.t;
}
```

This diff is all about propagating `shape_info.si_allows_unknown_fields` through into `nast_shape_info.nsi_allows_unknown_fields`. A subsequent diff will integrate the named information into typing information about the shapes.

Reviewed By: andrewjkennedy

Differential Revision: D4625662

fbshipit-source-id: e55e23dbf737a3c6385e116aaa4211f8a045d276
hphp/hack/src/decl/decl_hint.ml
hphp/hack/src/naming/naming.ml
hphp/hack/src/naming/nast.ml
hphp/hack/src/naming/nast_pos_mapper.ml
hphp/hack/src/typing/nastCheck.ml
hphp/hack/src/typing/typing.ml
hphp/hack/src/typing/typing_instantiability.ml
hphp/hack/src/utils/errors/errors.ml
hphp/hack/src/utils/errors/errors_sig.ml