Skip to content

Commit a178108

Browse files
authored
Fix for Visual Studio 2019 16.10 (#1614)
1 parent 5c58a59 commit a178108

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Generator/Generators/CSharp/CSharpSources.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2690,6 +2690,14 @@ private void GenerateMethodBody(Class @class, Method method,
26902690
{
26912691
GenerateVirtualFunctionCall(method);
26922692
}
2693+
else if (method.IsDestructor)
2694+
{
2695+
// It is possible that HasNonTrivialDestructor property different for specialization vs.
2696+
// the template. When we generate the Internal struct we only put a dtor there if the specialization
2697+
// has a non-trivial dtor. So we must make sure do the same test here.
2698+
if (@class.HasNonTrivialDestructor)
2699+
GenerateInternalFunctionCall(method, returnType: returnType);
2700+
}
26932701
else
26942702
{
26952703
GenerateInternalFunctionCall(method, returnType: returnType);

0 commit comments

Comments
 (0)