mirror of
https://github.com/github/codeql.git
synced 2026-04-26 01:05:15 +02:00
JS: Add: Test cases use of returnless function in findLast and findLastIndex
This commit is contained in:
@@ -107,3 +107,13 @@ class Bar extends Foo {
|
||||
console.log(super()); // OK.
|
||||
}
|
||||
}
|
||||
|
||||
() => {
|
||||
let equals = (x, y) => { return x === y; };
|
||||
|
||||
var foo = [1,2,3].findLastIndex(n => { equals(n, 3); }) // NOT OK -- Currently not flagged, but should be.
|
||||
console.log(foo);
|
||||
|
||||
var foo = [1,2,3].findLast(n => { equals(n, 3); }) // NOT OK -- Currently not flagged, but should be.
|
||||
console.log(foo);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user