Skip to content

Commit f44686b

Browse files
committed
Generate valid C++ for redeclaration of friends
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
1 parent a69f6d1 commit f44686b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/Generator/Passes/SymbolsCodeGenerator.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -322,10 +322,7 @@ private void WriteRedeclaration(Function function, string returnType,
322322
Write($"{string.Concat(parentsOpen)}");
323323
if (function.IsConstExpr)
324324
Write("constexpr ");
325-
Write(returnType);
326-
Write(" ");
327-
Write(parentsOpen.Count > 0 ? function.OriginalName : functionName);
328-
Write(paramTypes);
325+
Write($"{returnType} {function.OriginalName}{paramTypes}");
329326
if (functionType.ExceptionSpecType == ExceptionSpecType.BasicNoexcept)
330327
Write(" noexcept");
331328
WriteLine($";{string.Concat(parentsOpen.Select(_ => " }"))}");

0 commit comments

Comments
 (0)