We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 674838e commit 70e7c92Copy full SHA for 70e7c92
csharp/extractor/Semmle.Extraction.CSharp/SymbolExtensions.cs
@@ -527,7 +527,11 @@ public static bool IsUnboundReadOnlySpan(this ITypeSymbol type) =>
527
public static bool IsInlineArray(this ITypeSymbol type)
528
{
529
var attributes = type.GetAttributes();
530
- var isInline = attributes.Any(attribute => attribute.AttributeClass?.Name == "InlineArrayAttribute");
+ var isInline = attributes.Any(attribute =>
531
+ attribute.AttributeClass is INamedTypeSymbol nt &&
532
+ nt.Name == "InlineArrayAttribute" &&
533
+ nt.ContainingNamespace.ToString() == "System.Runtime.CompilerServices"
534
+ );
535
return isInline;
536
}
537
0 commit comments