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 849a0f1 commit 8544995Copy full SHA for 8544995
CommunityToolkit.Mvvm.SourceGenerators/Messaging/IMessengerRegisterAllGenerator.cs
@@ -27,7 +27,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context)
27
IncrementalValuesProvider<INamedTypeSymbol> typeSymbols =
28
context.SyntaxProvider
29
.CreateSyntaxProvider(
30
- static (node, _) => node is ClassDeclarationSyntax,
+ static (node, _) => node is ClassDeclarationSyntax { BaseList.Types.Count: > 0 },
31
static (context, _) => (INamedTypeSymbol)context.SemanticModel.GetDeclaredSymbol(context.Node)!);
32
33
// Get the target IRecipient<TMessage> interfaces and filter out other types
0 commit comments