Skip to content

Commit c60b8de

Browse files
committed
JS: Propagate through non-null assertions
1 parent 54a1c94 commit c60b8de

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

javascript/ql/lib/semmle/javascript/internal/NameResolution.qll

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,13 @@ module NameResolution {
128128
node2 = expr
129129
)
130130
or
131+
exists(NonNullAssertion assertion |
132+
// For the time being we don't use this for nullness analysis, so just
133+
// propagate through these assertions.
134+
node1 = assertion.getExpression() and
135+
node2 = assertion
136+
)
137+
or
131138
exists(FunctionTypeExpr fun |
132139
node1 = fun.getFunction() and
133140
node2 = fun

0 commit comments

Comments
 (0)