Skip to content

Commit 8ec03ed

Browse files
authored
Flush Module.ExternalClassTemplateSpecializations to avoid emitting the same specialization in multiple files
1 parent 617517f commit 8ec03ed

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Generator/Generators/CSharp/CSharpSources.cs

+3
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,9 @@ group s by s.TemplatedDecl.TemplatedClass into template
149149
UnindentAndWriteCloseBrace();
150150
PopBlock(NewLineKind.BeforeNextBlock);
151151
}
152+
153+
if (Options.GenerationOutputMode == GenerationOutputMode.FilePerUnit)
154+
Module.ExternalClassTemplateSpecializations.Clear();
152155
}
153156

154157
public virtual void GenerateUsings()

0 commit comments

Comments
 (0)