Skip to content

Commit 63c42c3

Browse files
committed
Use explicit type printer when printing types in C# GenerateMethodSpecifier.
1 parent 9ba53ac commit 63c42c3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Generator/Generators/CSharp/CSharpSources.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2363,20 +2363,20 @@ public override void GenerateMethodSpecifier(Method method,
23632363

23642364
var functionName = GetMethodIdentifier(method);
23652365

2366+
var printedType = method.OriginalReturnType.Visit(TypePrinter);
2367+
23662368
if (method.IsConstructor || method.IsDestructor)
23672369
Write("{0}(", functionName);
23682370
else if (method.ExplicitInterfaceImpl != null)
2369-
Write("{0} {1}.{2}(", method.OriginalReturnType,
2371+
Write("{0} {1}.{2}(", printedType,
23702372
method.ExplicitInterfaceImpl.Name, functionName);
23712373
else if (method.OperatorKind == CXXOperatorKind.Conversion ||
23722374
method.OperatorKind == CXXOperatorKind.ExplicitConversion)
23732375
{
2374-
var printedType = method.OriginalReturnType.Visit(TypePrinter);
23752376
Write($"{functionName} {printedType}(");
23762377
}
23772378
else
2378-
Write("{0} {1}(", method.OriginalReturnType, functionName);
2379-
2379+
Write("{0} {1}(", printedType, functionName);
23802380

23812381
Write(FormatMethodParameters(method.Parameters));
23822382

0 commit comments

Comments
 (0)