Test loading declaration of hot similar class with decl FIXME
commitd05b4f1ed8358f672af71ccfa97067f7410e85e5
authorJake Bailey (Hacklang) <jakebailey@fb.com>
Fri, 2 Nov 2018 23:37:28 +0000 (2 16:37 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Fri, 2 Nov 2018 23:40:20 +0000 (2 16:40 -0700)
tree2de5c839e0565c5f8ac213d947f57c4b5b551f51
parent54653c4ff58deedb5c6c0479b6c637d1741ecca6
Test loading declaration of hot similar class with decl FIXME

Summary:
If we fail to oldify declarations we loaded from the saved state which are in similar files (that is, files whose decl AST hash has not changed), positions in these declarations could be stale. When we recheck the file (since we always recheck similar files), we will re-parse it, updating the DECL_HH_FIXMES heap with new positional information (which no longer corresponds to the positions we loaded from the saved state). This can cause us to fail to suppress the error message (or alternatively, to report the wrong positions in error messages involving a stale loaded declaration).

We need to make sure the loaded declaration is oldified even though the decl AST hash has not changed. This test ensures that we do.

Reviewed By: dabek

Differential Revision: D12875742

fbshipit-source-id: b7ba5ddb87f630df34d8dfee17b11bbe676ff459
hphp/hack/test/integration_ml/saved_state/test_load_decls_fixme_in_hot_similar_class.ml [new file with mode: 0644]