Skip to content

Commit 64a99cc

Browse files
committed
Fix C++ parser ambiguity in generation of C++ method identifiers by wrapping them in parens.
1 parent aa2a711 commit 64a99cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Generator/Generators/C/CppSources.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ public override bool VisitFunctionDecl(Function function)
408408
var returnType = function.ReturnType.Visit(CTypePrinter);
409409

410410
var name = function.Visit(CTypePrinter);
411-
Write($"{returnType} {name}(");
411+
Write($"{returnType} ({name})(");
412412

413413
for (var i = 0; i < function.Parameters.Count; ++i)
414414
{

0 commit comments

Comments
 (0)