@@ -244,24 +244,24 @@ private TypeMention getExplicitTypeArgMention(Path path, TypeParam tp) {
244244}
245245
246246/**
247- * A matching configuration for resolving types of record expressions
247+ * A matching configuration for resolving types of struct expressions
248248 * like `Foo { bar = baz }`.
249249 */
250250private module StructExprMatchingInput implements MatchingInputSig {
251251 private newtype TPos =
252252 TFieldPos ( string name ) { exists ( any ( Declaration decl ) .getField ( name ) ) } or
253- TRecordPos ( )
253+ TStructPos ( )
254254
255255 class DeclarationPosition extends TPos {
256256 string asFieldPos ( ) { this = TFieldPos ( result ) }
257257
258- predicate isRecordPos ( ) { this = TRecordPos ( ) }
258+ predicate isStructPos ( ) { this = TStructPos ( ) }
259259
260260 string toString ( ) {
261261 result = this .asFieldPos ( )
262262 or
263- this .isRecordPos ( ) and
264- result = "(record )"
263+ this .isStructPos ( ) and
264+ result = "(struct )"
265265 }
266266 }
267267
@@ -282,15 +282,15 @@ private module StructExprMatchingInput implements MatchingInputSig {
282282 result = tp .resolveTypeAt ( path )
283283 )
284284 or
285- // type parameter of the record itself
286- dpos .isRecordPos ( ) and
285+ // type parameter of the struct itself
286+ dpos .isStructPos ( ) and
287287 result = this .getTypeParameter ( _) and
288288 path = TypePath:: singleton ( result )
289289 }
290290 }
291291
292- private class RecordStructDecl extends Declaration , Struct {
293- RecordStructDecl ( ) { this .isRecord ( ) }
292+ private class StructDecl extends Declaration , Struct {
293+ StructDecl ( ) { this .isStruct ( ) }
294294
295295 override TypeParam getATypeParam ( ) { result = this .getGenericParamList ( ) .getATypeParam ( ) }
296296
@@ -300,14 +300,14 @@ private module StructExprMatchingInput implements MatchingInputSig {
300300 result = super .getDeclaredType ( dpos , path )
301301 or
302302 // type of the struct itself
303- dpos .isRecordPos ( ) and
303+ dpos .isStructPos ( ) and
304304 path .isEmpty ( ) and
305305 result = TStruct ( this )
306306 }
307307 }
308308
309- private class RecordVariantDecl extends Declaration , Variant {
310- RecordVariantDecl ( ) { this .isRecord ( ) }
309+ private class StructVariantDecl extends Declaration , Variant {
310+ StructVariantDecl ( ) { this .isStruct ( ) }
311311
312312 Enum getEnum ( ) { result .getVariantList ( ) .getAVariant ( ) = this }
313313
@@ -321,7 +321,7 @@ private module StructExprMatchingInput implements MatchingInputSig {
321321 result = super .getDeclaredType ( dpos , path )
322322 or
323323 // type of the enum itself
324- dpos .isRecordPos ( ) and
324+ dpos .isStructPos ( ) and
325325 path .isEmpty ( ) and
326326 result = TEnum ( this .getEnum ( ) )
327327 }
@@ -338,7 +338,7 @@ private module StructExprMatchingInput implements MatchingInputSig {
338338 result = this .getFieldExpr ( apos .asFieldPos ( ) ) .getExpr ( )
339339 or
340340 result = this and
341- apos .isRecordPos ( )
341+ apos .isStructPos ( )
342342 }
343343
344344 Type getInferredType ( AccessPosition apos , TypePath path ) {
@@ -356,8 +356,8 @@ private module StructExprMatchingInput implements MatchingInputSig {
356356private module StructExprMatching = Matching< StructExprMatchingInput > ;
357357
358358/**
359- * Gets the type of `n` at `path`, where `n` is either a record expression or
360- * a field expression of a record expression.
359+ * Gets the type of `n` at `path`, where `n` is either a struct expression or
360+ * a field expression of a struct expression.
361361 */
362362pragma [ nomagic]
363363private Type inferStructExprType ( AstNode n , TypePath path ) {
@@ -773,7 +773,7 @@ private module FieldExprMatchingInput implements MatchingInputSig {
773773
774774 Declaration getTarget ( ) {
775775 // mutual recursion; resolving fields requires resolving types and vice versa
776- result = [ resolveRecordFieldExpr ( this ) .( AstNode ) , resolveTupleFieldExpr ( this ) ]
776+ result = [ resolveStructFieldExpr ( this ) .( AstNode ) , resolveTupleFieldExpr ( this ) ]
777777 }
778778 }
779779
@@ -917,10 +917,10 @@ private module Cached {
917917 }
918918
919919 /**
920- * Gets the record field that the field expression `fe` resolves to, if any.
920+ * Gets the struct field that the field expression `fe` resolves to, if any.
921921 */
922922 cached
923- StructField resolveRecordFieldExpr ( FieldExpr fe ) {
923+ StructField resolveStructFieldExpr ( FieldExpr fe ) {
924924 exists ( string name | result = getFieldExprLookupType ( fe , name ) .getStructField ( name ) )
925925 }
926926
0 commit comments