Skip to content

Commit dc76775

Browse files
committed
C#: Consider 'record' a type modifier in the extractor (it can be applied to both class and struct).
1 parent c17bd29 commit dc76775

File tree

1 file changed

+3
-0
lines changed
  • csharp/extractor/Semmle.Extraction.CSharp/Entities

1 file changed

+3
-0
lines changed

csharp/extractor/Semmle.Extraction.CSharp/Entities/Modifier.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ public static void ExtractModifiers(Context cx, TextWriter trapFile, IEntity key
111111
if (nt is null)
112112
throw new InternalError(symbol, "Symbol kind is inconsistent with its type");
113113

114+
if (nt.IsRecord)
115+
HasModifier(cx, trapFile, key, "record");
116+
114117
if (nt.TypeKind == TypeKind.Struct)
115118
{
116119
if (nt.IsReadOnly)

0 commit comments

Comments
 (0)