@@ -248,24 +248,24 @@ private TypeMention getExplicitTypeArgMention(Path path, TypeParam tp) {
248248}
249249
250250/**
251- * A matching configuration for resolving types of record expressions
251+ * A matching configuration for resolving types of struct expressions
252252 * like `Foo { bar = baz }`.
253253 */
254254private module StructExprMatchingInput implements MatchingInputSig {
255255 private newtype TPos =
256256 TFieldPos ( string name ) { exists ( any ( Declaration decl ) .getField ( name ) ) } or
257- TRecordPos ( )
257+ TStructPos ( )
258258
259259 class DeclarationPosition extends TPos {
260260 string asFieldPos ( ) { this = TFieldPos ( result ) }
261261
262- predicate isRecordPos ( ) { this = TRecordPos ( ) }
262+ predicate isStructPos ( ) { this = TStructPos ( ) }
263263
264264 string toString ( ) {
265265 result = this .asFieldPos ( )
266266 or
267- this .isRecordPos ( ) and
268- result = "(record )"
267+ this .isStructPos ( ) and
268+ result = "(struct )"
269269 }
270270 }
271271
@@ -286,15 +286,15 @@ private module StructExprMatchingInput implements MatchingInputSig {
286286 result = tp .resolveTypeAt ( path )
287287 )
288288 or
289- // type parameter of the record itself
290- dpos .isRecordPos ( ) and
289+ // type parameter of the struct itself
290+ dpos .isStructPos ( ) and
291291 result = this .getTypeParameter ( _) and
292292 path = TypePath:: singleton ( result )
293293 }
294294 }
295295
296- private class RecordStructDecl extends Declaration , Struct {
297- RecordStructDecl ( ) { this .isRecord ( ) }
296+ private class StructDecl extends Declaration , Struct {
297+ StructDecl ( ) { this .isStruct ( ) }
298298
299299 override TypeParam getATypeParam ( ) { result = this .getGenericParamList ( ) .getATypeParam ( ) }
300300
@@ -304,14 +304,14 @@ private module StructExprMatchingInput implements MatchingInputSig {
304304 result = super .getDeclaredType ( dpos , path )
305305 or
306306 // type of the struct itself
307- dpos .isRecordPos ( ) and
307+ dpos .isStructPos ( ) and
308308 path .isEmpty ( ) and
309309 result = TStruct ( this )
310310 }
311311 }
312312
313- private class RecordVariantDecl extends Declaration , Variant {
314- RecordVariantDecl ( ) { this .isRecord ( ) }
313+ private class StructVariantDecl extends Declaration , Variant {
314+ StructVariantDecl ( ) { this .isStruct ( ) }
315315
316316 Enum getEnum ( ) { result .getVariantList ( ) .getAVariant ( ) = this }
317317
@@ -325,7 +325,7 @@ private module StructExprMatchingInput implements MatchingInputSig {
325325 result = super .getDeclaredType ( dpos , path )
326326 or
327327 // type of the enum itself
328- dpos .isRecordPos ( ) and
328+ dpos .isStructPos ( ) and
329329 path .isEmpty ( ) and
330330 result = TEnum ( this .getEnum ( ) )
331331 }
@@ -342,7 +342,7 @@ private module StructExprMatchingInput implements MatchingInputSig {
342342 result = this .getFieldExpr ( apos .asFieldPos ( ) ) .getExpr ( )
343343 or
344344 result = this and
345- apos .isRecordPos ( )
345+ apos .isStructPos ( )
346346 }
347347
348348 Type getInferredType ( AccessPosition apos , TypePath path ) {
@@ -360,8 +360,8 @@ private module StructExprMatchingInput implements MatchingInputSig {
360360private module StructExprMatching = Matching< StructExprMatchingInput > ;
361361
362362/**
363- * Gets the type of `n` at `path`, where `n` is either a record expression or
364- * a field expression of a record expression.
363+ * Gets the type of `n` at `path`, where `n` is either a struct expression or
364+ * a field expression of a struct expression.
365365 */
366366pragma [ nomagic]
367367private Type inferStructExprType ( AstNode n , TypePath path ) {
@@ -777,7 +777,7 @@ private module FieldExprMatchingInput implements MatchingInputSig {
777777
778778 Declaration getTarget ( ) {
779779 // mutual recursion; resolving fields requires resolving types and vice versa
780- result = [ resolveRecordFieldExpr ( this ) .( AstNode ) , resolveTupleFieldExpr ( this ) ]
780+ result = [ resolveStructFieldExpr ( this ) .( AstNode ) , resolveTupleFieldExpr ( this ) ]
781781 }
782782 }
783783
@@ -921,10 +921,10 @@ private module Cached {
921921 }
922922
923923 /**
924- * Gets the record field that the field expression `fe` resolves to, if any.
924+ * Gets the struct field that the field expression `fe` resolves to, if any.
925925 */
926926 cached
927- StructField resolveRecordFieldExpr ( FieldExpr fe ) {
927+ StructField resolveStructFieldExpr ( FieldExpr fe ) {
928928 exists ( string name | result = getFieldExprLookupType ( fe , name ) .getStructField ( name ) )
929929 }
930930
0 commit comments