Commit bd0a882
JS: Fix CFG successor edges for parenthesized optional chain bases
When a parenthesized expression is the callee/object of an optional
chain step (e.g. `(null)?.()`), the postVisitChainable method was
writing CFG successor edges FROM the ParenthesizedExpression node.
Since ParenthesizedExpression nodes are now bypassed and have no DB
entry, this caused VALUE_NOT_IN_TYPE errors in the successor relation.
Fix by unwrapping ParenthesizedExpression before writing the successor
edge, so the edge is written from the inner expression instead.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent c89e541 commit bd0a882
File tree
1 file changed
+4
-0
lines changed- javascript/extractor/src/com/semmle/js/extractor
1 file changed
+4
-0
lines changedLines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1778 | 1778 | | |
1779 | 1779 | | |
1780 | 1780 | | |
| 1781 | + | |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
1781 | 1785 | | |
1782 | 1786 | | |
1783 | 1787 | | |
| |||
0 commit comments