Add test for exception flow out of finally()

This commit is contained in:
Asger F
2024-11-21 10:57:07 +01:00
parent 948d21ca07
commit 84820adf3c

View File

@@ -66,3 +66,16 @@ function e4() {
sink(e);
}
}
async function e5() {
try {
Promise.resolve(0).finally(() => {
throw source("e5.1");
});
await Promise.resolve(0).finally(() => {
throw source("e5.2");
});
} catch (e) {
sink(e); // $ hasValueFlow=e5.2
}
}