mirror of
https://github.com/github/codeql.git
synced 2026-05-03 04:39:29 +02:00
JS(extractor): support optional chaining
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
a?.b.c(++x).d;
|
||||
|
||||
a?.b[3].c?.(x).d;
|
||||
|
||||
(a?.b).c;
|
||||
|
||||
(a?.b.c).d;
|
||||
|
||||
a?.[b?.c?.d].e?.f;
|
||||
|
||||
a?.()[b?.().c?.().d].e?.().f;
|
||||
|
||||
if (a?.b) {
|
||||
true;
|
||||
} else {
|
||||
false;
|
||||
}
|
||||
|
||||
if (!a?.b) {
|
||||
true;
|
||||
} else {
|
||||
false;
|
||||
}
|
||||
|
||||
if (a?.b && c?.d) {
|
||||
true;
|
||||
} else {
|
||||
false;
|
||||
}
|
||||
Reference in New Issue
Block a user