Files
test-repo/tests/flow/try/abnormals.js
T
Christopher Chedeau 3375cfe605 Move tests around (#454)
* new_tests

* move_all_clobbered_tests

* remove all the tests that no longer exist

* re-run flow tests

* Move all the flow tests to tests/flow and prettier to tests/

* Move prettier tests to their own folders

* Add jsfmt files

* run prettier snapshot tests
2017-01-24 14:35:37 -08:00

16 lines
384 B
JavaScript

/* @flow */
/* This test documents an issue we used to have with merging the environment of
* the try block and the catch block. The error variable, when inspected and in
* the presence of an abnormal, would sometimes kind of leak. It would hit an
* abnormal. It was weird.
*/
function foo() {
try {
} catch(error) {
if (error.foo === 4) {
throw error;
}
}
}