mirror of
https://github.com/github/codeql.git
synced 2026-04-28 18:25:24 +02:00
add more passing tests
This commit is contained in:
@@ -14,4 +14,20 @@
|
||||
return source;
|
||||
}
|
||||
sink(gen2()); // OK
|
||||
|
||||
Array.from(gen1()).forEach(x => sink(x)); // NOT OK
|
||||
|
||||
function gen3() {
|
||||
yield source;
|
||||
}
|
||||
Array.from(gen3()).forEach(x => sink(x)); // NOT OK
|
||||
|
||||
function *gen4() {
|
||||
throw source;
|
||||
}
|
||||
try {
|
||||
Array.from(gen4());
|
||||
} catch (e) {
|
||||
sink(e); // NOT OK
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user