Skip to content

Commit

Permalink
Merge pull request #726 from microsoft/fix723
Browse files Browse the repository at this point in the history
Declare methods on COM interfaces-as-structs as `public`
  • Loading branch information
AArnott authored Oct 13, 2022
2 parents 67ca333 + d9cde72 commit ea3d883
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Microsoft.Windows.CsWin32/Generator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3527,7 +3527,7 @@ private TypeDeclarationSyntax DeclareInterfaceAsStruct(TypeDefinitionHandle type

MethodDeclarationSyntax methodDeclaration = MethodDeclaration(
List<AttributeListSyntax>(),
modifiers: TokenList(TokenWithSpace(this.Visibility)),
modifiers: TokenList(TokenWithSpace(SyntaxKind.PublicKeyword)), // always use public so struct can implement the COM interface
returnType.Type.WithTrailingTrivia(TriviaList(Space)),
explicitInterfaceSpecifier: null!,
SafeIdentifier(methodName),
Expand Down

0 comments on commit ea3d883

Please sign in to comment.