hhvm
hhvm copied to clipboard
Update Exception::__construct($previous)
The type should be nullable Throwable since 4.162.0. There may have been good reasons for leaving it though...
Fixes #8239
@Atry has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
https://github.com/facebook/hhvm/blob/e8ffdc22c2e50a8cbb8be312718116a46dee8476/hphp/hack/hhi/exceptions.hhi#L97 is definitely wrong!
@lexidor has updated the pull request. You must reimport the pull request before landing.
@Atry has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
Some test failures:
hphp/hack/test/tast/contravariant_solve.php hphp/hack/test/tast/finally.php hphp/hack/test/tast/reactive.php hphp/hack/test/tast/control_flow/do_throw_while.php hphp/hack/test/tast/control_flow/while_throw.php hphp/hack/test/tast/re_prefixed_string/re_prefixed_string.php
@lexidor Feel free to rebase this PR onto master to see the test result from GitHub Actions recently added.
Close and reopen this PR to trigger the CI
Ah, the tast contains a a lot of explicit dumps of the signatures. So the test fails because the expect file contains
function(string=, int=, ?\Exception=)
I'll rebase and try to get my local test suite running. That should find all the places where the sig is included in some expect output.
@Atry has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
The CI on GitHub Actions passes because it runs the quick tests only, not the full set of tests. https://github.com/facebook/hhvm/blob/e25051f8e9e824966ac7898715411e58a0f21659/flake.nix#L35
This PR is stale and conflicts with HEAD. Closing.