Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DllImportGenerator] Reserved keywords support #1096

Closed
SupinePandora43 opened this issue May 8, 2021 · 1 comment · Fixed by #1105
Closed

[DllImportGenerator] Reserved keywords support #1096

SupinePandora43 opened this issue May 8, 2021 · 1 comment · Fixed by #1105
Labels
area-DllImportGenerator Source Generated stubs for P/Invokes in C#

Comments

@SupinePandora43
Copy link

[GeneratedDllImport("Example")]
internal static partial void MyFunc([MarshalAs(UnmanagedType.LPUTF8Str)] string @event);

Actual Result

CS8795: Partial method 'MyFunc(string)' must have an implementation part because it has accessibility modifiers in source file
CS0759: No defining declaration found for implementing declaration of partial method 'MyFunc(string, event)' in DllImportGenerator.g.cs

Generated code

internal static partial void MyFunc(string event)

Expected Result

Generated code

internal static partial void MyFunc(string @event)

@jkoritzinsky
Copy link
Member

Fixed by #1105

jkoritzinsky added a commit to jkoritzinsky/runtime that referenced this issue Sep 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-DllImportGenerator Source Generated stubs for P/Invokes in C#
Projects
None yet
2 participants