Skip to content

Commit 0aaa952

Browse files
committed
Fix abstract model inheritance chain construction
1 parent c11380a commit 0aaa952

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/TrProtocol.SerializerGenerator/SerializeGenerator.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1555,7 +1555,7 @@ INamedTypeSymbol[] ExtractAbstractModelInheritance(INamedTypeSymbol type) {
15551555
}
15561556

15571557
chain.Reverse();
1558-
return [];
1558+
return [.. chain];
15591559
}
15601560

15611561
return [];
@@ -1630,7 +1630,7 @@ param[0].Type is PointerTypeSyntax pointerType &&
16301630
}
16311631
return false;
16321632
})) {
1633-
classNode.Write($"public unsafe {((model.IsConcreteImpl && !model.IsValueType) ? "override " : "")}void WriteContent(ref void* ptr) ");
1633+
classNode.Write($"public unsafe {((model.IsConcreteImpl && !model.IsValueType) ? "override " : "readonly ")}void WriteContent(ref void* ptr) ");
16341634
classNode.Sources.Add(writeNode);
16351635
}
16361636
#endregion

0 commit comments

Comments
 (0)