@@ -187,8 +187,22 @@ class ClassAggregateLiteral extends AggregateLiteral {
187
187
override string getAPrimaryQlClass ( ) { result = "ClassAggregateLiteral" }
188
188
189
189
/**
190
+ * Gets an expression within the aggregate literal that is used to initialize
191
+ * field `field`, if present.
192
+ *
193
+ * This predicate may have multiple results since a field can be initialized
194
+ * multiple times in the same initializer.
195
+ */
196
+ Expr getAFieldExpr ( Field field ) { result = this .getFieldExpr ( field , _) }
197
+
198
+ /**
199
+ * DEPRECATED: Use `getAFieldExpr` instead.
200
+ *
190
201
* Gets the expression within the aggregate literal that is used to initialize
191
202
* field `field`, if present.
203
+ *
204
+ * This predicate may have multiple results since a field can be initialized
205
+ * multiple times in the same initializer.
192
206
*/
193
207
Expr getFieldExpr ( Field field ) { result = this .getFieldExpr ( field , _) }
194
208
@@ -274,8 +288,22 @@ class ArrayOrVectorAggregateLiteral extends AggregateLiteral {
274
288
Type getElementType ( ) { none ( ) }
275
289
276
290
/**
291
+ * Gets an expression within the aggregate literal that is used to initialize
292
+ * element `elementIndex`, if present.
293
+ *
294
+ * This predicate may have multiple results since an element can be initialized
295
+ * multiple times in the same initializer.
296
+ */
297
+ Expr getAnElementExpr ( int elementIndex ) { result = this .getElementExpr ( elementIndex , _) }
298
+
299
+ /**
300
+ * DEPRECATED: Use `getAnElementExpr` instead.
301
+ *
277
302
* Gets the expression within the aggregate literal that is used to initialize
278
303
* element `elementIndex`, if present.
304
+ *
305
+ * This predicate may have multiple results since an element can be initialized
306
+ * multiple times in the same initializer.
279
307
*/
280
308
Expr getElementExpr ( int elementIndex ) { result = this .getElementExpr ( elementIndex , _) }
281
309
0 commit comments