Skip to content

Commit d199173

Browse files
authored
add a getAPrimaryQlClass predicate to ExpressionWithTypeArguments
1 parent efa895e commit d199173

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

javascript/ql/lib/semmle/javascript/TypeScript.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,6 +1286,8 @@ class ExpressionWithTypeArguments extends @expression_with_type_arguments, Expr
12861286
override ControlFlowNode getFirstControlFlowNode() {
12871287
result = this.getExpression().getFirstControlFlowNode()
12881288
}
1289+
1290+
override string getAPrimaryQlClass() { result = "ExpressionWithTypeArguments" }
12891291
}
12901292

12911293
/**

javascript/ql/test/library-tests/TypeScript/Types/printAst.expected

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1239,7 +1239,7 @@ nodes
12391239
| tst.ts:325:7:325:14 | [VarDecl] ErrorMap | semmle.label | [VarDecl] ErrorMap |
12401240
| tst.ts:325:7:325:35 | [VariableDeclarator] ErrorMa ... Error> | semmle.label | [VariableDeclarator] ErrorMa ... Error> |
12411241
| tst.ts:325:18:325:20 | [VarRef] Map | semmle.label | [VarRef] Map |
1242-
| tst.ts:325:18:325:35 | [???] Map<string, Error> | semmle.label | [???] Map<string, Error> |
1242+
| tst.ts:325:18:325:35 | [ExpressionWithTypeArguments] Map<string, Error> | semmle.label | [ExpressionWithTypeArguments] Map<string, Error> |
12431243
| tst.ts:325:22:325:27 | [KeywordTypeExpr] string | semmle.label | [KeywordTypeExpr] string |
12441244
| tst.ts:325:30:325:34 | [LocalTypeAccess] Error | semmle.label | [LocalTypeAccess] Error |
12451245
| tst.ts:327:1:327:32 | [DeclStmt] const errorMap = ... | semmle.label | [DeclStmt] const errorMap = ... |
@@ -3852,14 +3852,14 @@ edges
38523852
| tst.ts:325:1:325:36 | [DeclStmt] const ErrorMap = ... | tst.ts:325:7:325:35 | [VariableDeclarator] ErrorMa ... Error> | semmle.order | 1 |
38533853
| tst.ts:325:7:325:35 | [VariableDeclarator] ErrorMa ... Error> | tst.ts:325:7:325:14 | [VarDecl] ErrorMap | semmle.label | 1 |
38543854
| tst.ts:325:7:325:35 | [VariableDeclarator] ErrorMa ... Error> | tst.ts:325:7:325:14 | [VarDecl] ErrorMap | semmle.order | 1 |
3855-
| tst.ts:325:7:325:35 | [VariableDeclarator] ErrorMa ... Error> | tst.ts:325:18:325:35 | [???] Map<string, Error> | semmle.label | 2 |
3856-
| tst.ts:325:7:325:35 | [VariableDeclarator] ErrorMa ... Error> | tst.ts:325:18:325:35 | [???] Map<string, Error> | semmle.order | 2 |
3857-
| tst.ts:325:18:325:35 | [???] Map<string, Error> | tst.ts:325:18:325:20 | [VarRef] Map | semmle.label | 1 |
3858-
| tst.ts:325:18:325:35 | [???] Map<string, Error> | tst.ts:325:18:325:20 | [VarRef] Map | semmle.order | 1 |
3859-
| tst.ts:325:18:325:35 | [???] Map<string, Error> | tst.ts:325:22:325:27 | [KeywordTypeExpr] string | semmle.label | 2 |
3860-
| tst.ts:325:18:325:35 | [???] Map<string, Error> | tst.ts:325:22:325:27 | [KeywordTypeExpr] string | semmle.order | 2 |
3861-
| tst.ts:325:18:325:35 | [???] Map<string, Error> | tst.ts:325:30:325:34 | [LocalTypeAccess] Error | semmle.label | 3 |
3862-
| tst.ts:325:18:325:35 | [???] Map<string, Error> | tst.ts:325:30:325:34 | [LocalTypeAccess] Error | semmle.order | 3 |
3855+
| tst.ts:325:7:325:35 | [VariableDeclarator] ErrorMa ... Error> | tst.ts:325:18:325:35 | [ExpressionWithTypeArguments] Map<string, Error> | semmle.label | 2 |
3856+
| tst.ts:325:7:325:35 | [VariableDeclarator] ErrorMa ... Error> | tst.ts:325:18:325:35 | [ExpressionWithTypeArguments] Map<string, Error> | semmle.order | 2 |
3857+
| tst.ts:325:18:325:35 | [ExpressionWithTypeArguments] Map<string, Error> | tst.ts:325:18:325:20 | [VarRef] Map | semmle.label | 1 |
3858+
| tst.ts:325:18:325:35 | [ExpressionWithTypeArguments] Map<string, Error> | tst.ts:325:18:325:20 | [VarRef] Map | semmle.order | 1 |
3859+
| tst.ts:325:18:325:35 | [ExpressionWithTypeArguments] Map<string, Error> | tst.ts:325:22:325:27 | [KeywordTypeExpr] string | semmle.label | 2 |
3860+
| tst.ts:325:18:325:35 | [ExpressionWithTypeArguments] Map<string, Error> | tst.ts:325:22:325:27 | [KeywordTypeExpr] string | semmle.order | 2 |
3861+
| tst.ts:325:18:325:35 | [ExpressionWithTypeArguments] Map<string, Error> | tst.ts:325:30:325:34 | [LocalTypeAccess] Error | semmle.label | 3 |
3862+
| tst.ts:325:18:325:35 | [ExpressionWithTypeArguments] Map<string, Error> | tst.ts:325:30:325:34 | [LocalTypeAccess] Error | semmle.order | 3 |
38633863
| tst.ts:327:1:327:32 | [DeclStmt] const errorMap = ... | tst.ts:327:7:327:31 | [VariableDeclarator] errorMa ... orMap() | semmle.label | 1 |
38643864
| tst.ts:327:1:327:32 | [DeclStmt] const errorMap = ... | tst.ts:327:7:327:31 | [VariableDeclarator] errorMa ... orMap() | semmle.order | 1 |
38653865
| tst.ts:327:7:327:31 | [VariableDeclarator] errorMa ... orMap() | tst.ts:327:7:327:14 | [VarDecl] errorMap | semmle.label | 1 |

0 commit comments

Comments
 (0)