Skip to content

Commit 9947b32

Browse files
Jami Cogswellatorralba
authored andcommitted
resolve merge conflict
1 parent 11ce910 commit 9947b32

File tree

6 files changed

+342
-381
lines changed

6 files changed

+342
-381
lines changed

java/ql/lib/semmle/code/java/Expr.qll

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1316,6 +1316,19 @@ class ClassInstanceExpr extends Expr, ConstructorCall, @classinstancexpr {
13161316
result = this.getAnArgument()
13171317
}
13181318

1319+
// ! remove below predicate after experimentation
1320+
/**
1321+
* Gets the argument provided to the constructor of this class instance creation expression
1322+
* of the specified Type.
1323+
*/
1324+
Expr getArgumentByType(Type type) {
1325+
exists(Argument arg |
1326+
arg = this.getAnArgument() and
1327+
arg.getType() = type and
1328+
result = arg
1329+
)
1330+
}
1331+
13191332
/**
13201333
* Gets a type argument provided to the constructor of this class instance creation expression.
13211334
*

0 commit comments

Comments
 (0)