Skip to content

Commit eca0db1

Browse files
committed
Generate valid C++ for protected inline functions
Signed-off-by: Dimitar Dobrev <[email protected]>
1 parent 4397cae commit eca0db1

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/Generator/Passes/SymbolsCodeGenerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ private void TakeFunctionAddress(Function function, string wrapper)
248248

249249
if (function.Access == AccessSpecifier.Protected)
250250
{
251-
Write($" = &{wrapper}{function.Namespace.Name}::{functionName};");
251+
Write($" = &{wrapper}{function.Namespace.Name}::{function.OriginalName};");
252252
WriteLine(" };");
253253
Write($"auto {wrapper}Protected = {wrapper}{function.Namespace.Name}::{wrapper};");
254254
}

tests/Common/Common.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,8 @@ namespace SomeNamespace
491491
public:
492492
Inlines(int param) {}
493493
inline operator NamespacedAbstractImpl () const { return NamespacedAbstractImpl(); }
494+
protected:
495+
void protectedInlined() {}
494496
};
495497
}
496498

0 commit comments

Comments
 (0)