Spot the bug in the attribute filter

from Source generators
C# 14 / .NET 10 intermediate 4 min 1 issue to find

Find why this candidate filter misses valid uses and can match the wrong attribute.

csharp
using System.Linq;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp.Syntax;

var targets = context.SyntaxProvider.CreateSyntaxProvider(
    static (node, _) => node is ClassDeclarationSyntax declaration &&
        declaration.AttributeLists.SelectMany(list => list.Attributes)
            .Any(attribute => attribute.Name.ToString() == "Describe"),
    static (match, _) => (ClassDeclarationSyntax)match.Node);
Open in playground
Report an error