File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
Microsoft.Toolkit.Mvvm.SourceGenerators/Messaging Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -42,9 +42,7 @@ from classDeclaration in syntaxTree.GetRoot().DescendantNodes().OfType<ClassDecl
4242 let classSymbol = semanticModel . GetDeclaredSymbol ( classDeclaration )
4343 where
4444 classSymbol is { IsGenericType : false } &&
45- classSymbol . AllInterfaces . Any ( i =>
46- i . IsGenericType &&
47- SymbolEqualityComparer . Default . Equals ( i . ConstructedFrom , iRecipientSymbol ) )
45+ classSymbol . AllInterfaces . Any ( i => SymbolEqualityComparer . Default . Equals ( i . OriginalDefinition , iRecipientSymbol ) )
4846 select classSymbol ;
4947
5048 // Prepare the attributes to add to the first class declaration
@@ -171,8 +169,7 @@ private static IEnumerable<StatementSyntax> EnumerateRegistrationStatements(INam
171169 {
172170 foreach ( var interfaceSymbol in classSymbol . AllInterfaces )
173171 {
174- if ( ! interfaceSymbol . IsGenericType ||
175- ! SymbolEqualityComparer . Default . Equals ( interfaceSymbol . ConstructedFrom , iRecipientSymbol ) )
172+ if ( ! SymbolEqualityComparer . Default . Equals ( interfaceSymbol . OriginalDefinition , iRecipientSymbol ) )
176173 {
177174 continue ;
178175 }
@@ -206,8 +203,7 @@ private static IEnumerable<StatementSyntax> EnumerateRegistrationStatementsWithT
206203 {
207204 foreach ( var interfaceSymbol in classSymbol . AllInterfaces )
208205 {
209- if ( ! interfaceSymbol . IsGenericType ||
210- ! SymbolEqualityComparer . Default . Equals ( interfaceSymbol . ConstructedFrom , iRecipientSymbol ) )
206+ if ( ! SymbolEqualityComparer . Default . Equals ( interfaceSymbol . OriginalDefinition , iRecipientSymbol ) )
211207 {
212208 continue ;
213209 }
You can’t perform that action at this time.
0 commit comments