mirror of
https://github.com/github/codeql.git
synced 2026-04-30 03:05:15 +02:00
JS: Update range analysis to use getImmediatePredecessor
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
function defaultParam(param = 0) {
|
||||
if (param > 0) {} // OK
|
||||
}
|
||||
|
||||
function defaultPattern(obj, arr) {
|
||||
let { prop = 0 } = obj;
|
||||
if (prop > 0) {} // OK
|
||||
|
||||
let [ elm = 0 ] = arr;
|
||||
if (elm > 0) {} // OK
|
||||
}
|
||||
Reference in New Issue
Block a user