diff --git a/sources/ClangSharp.PInvokeGenerator/CSharp/CSharpOutputBuilder.VisitDecl.cs b/sources/ClangSharp.PInvokeGenerator/CSharp/CSharpOutputBuilder.VisitDecl.cs index 19722075..2bc06e95 100644 --- a/sources/ClangSharp.PInvokeGenerator/CSharp/CSharpOutputBuilder.VisitDecl.cs +++ b/sources/ClangSharp.PInvokeGenerator/CSharp/CSharpOutputBuilder.VisitDecl.cs @@ -445,7 +445,7 @@ public void BeginFunctionOrDelegate(in FunctionOrDelegateDesc desc, ref bool isM } else { - WriteIndented(GetAccessSpecifierString(desc.AccessSpecifier, isNested: false)); + WriteIndented(GetAccessSpecifierString(desc.AccessSpecifier, isNested: true)); Write(' '); } diff --git a/sources/ClangSharp.PInvokeGenerator/PInvokeGenerator.VisitDecl.cs b/sources/ClangSharp.PInvokeGenerator/PInvokeGenerator.VisitDecl.cs index 12009575..0dfe68fb 100644 --- a/sources/ClangSharp.PInvokeGenerator/PInvokeGenerator.VisitDecl.cs +++ b/sources/ClangSharp.PInvokeGenerator/PInvokeGenerator.VisitDecl.cs @@ -491,7 +491,7 @@ private void VisitFunctionDecl(FunctionDecl functionDecl) return; } - var accessSppecifier = GetAccessSpecifier(functionDecl); + var accessSpecifier = GetAccessSpecifier(functionDecl); var body = functionDecl.Body; var hasBody = body is not null; @@ -530,7 +530,7 @@ private void VisitFunctionDecl(FunctionDecl functionDecl) var needsReturnFixup = isCxxMethodDecl && NeedsReturnFixup(cxxMethodDecl); var desc = new FunctionOrDelegateDesc { - AccessSpecifier = accessSppecifier, + AccessSpecifier = accessSpecifier, NativeTypeName = nativeTypeName, EscapedName = escapedName, ParentName = parentName, @@ -3677,7 +3677,7 @@ private bool IsPrimitiveValue(Type type) { return IsPrimitiveValue(autoType.CanonicalType); } - else if (type is BuiltinType builtinType) + else if (type is BuiltinType) { switch (type.Kind) {