Skip to content

Commit f7c04dc

Browse files
authored
fix: filter unique classes to include only those with properties (#3086)
1 parent f70ed53 commit f7c04dc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

TUnit.Core.SourceGenerator/Generators/PropertyInjectionSourceGenerator.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ private static void GeneratePropertyInjectionSources(SourceProductionContext con
147147
var uniqueClasses = classes
148148
.GroupBy(c => c.ClassSymbol, SymbolEqualityComparer.Default)
149149
.Select(g => g.First())
150+
.Where(x => x.Properties.Length > 0)
150151
.ToImmutableArray();
151152

152153
// Generate all property sources first with stable names

0 commit comments

Comments
 (0)