diff --git a/src/Generator/Generators/Template.cs b/src/Generator/Generators/Template.cs index 927d3c49..000f151d 100644 --- a/src/Generator/Generators/Template.cs +++ b/src/Generator/Generators/Template.cs @@ -291,10 +291,14 @@ namespace CppSharp.Generators ActiveBlock = block; } - public void PopBlock(NewLineKind newLineKind = NewLineKind.Never) + public Block PopBlock(NewLineKind newLineKind = NewLineKind.Never) { + var block = ActiveBlock; + ActiveBlock.NewLineKind = newLineKind; ActiveBlock = ActiveBlock.Parent; + + return block; } public IEnumerable FindBlocks(int kind)