Move property errors from shallow decl to typing
commit8e2027f2b3c386a757952a9188e44f0e861fb9cf
authorMillie Chen <milliechen@fb.com>
Wed, 23 Sep 2020 20:22:58 +0000 (23 13:22 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Wed, 23 Sep 2020 20:28:08 +0000 (23 13:28 -0700)
tree7b80d79a04e90596813adbec31ab4a568924b95a
parent6209382f62bf7a2d84c288caa785f66c9b406ce1
Move property errors from shallow decl to typing

Summary:
During shallow decl of non-static properties, we report an error when

- the property is declared final- move this to `typing_toplevel.class_var_def `
- the property is late-initialized but has a default value- move this to `nastInitCheck` because we already check this there for static properties

Reviewed By: Wilfred

Differential Revision: D23831739

fbshipit-source-id: 314754542fd311b76828c2b8b787d393cbff8c42
hphp/hack/src/decl/shallow_decl.ml
hphp/hack/src/typing/nastInitCheck.ml
hphp/hack/src/typing/typing_toplevel.ml