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

Formatting deletes unsafe modifier #1416

Closed
Saancreed opened this issue Dec 28, 2024 · 2 comments · Fixed by #1417
Closed

Formatting deletes unsafe modifier #1416

Saancreed opened this issue Dec 28, 2024 · 2 comments · Fixed by #1417
Milestone

Comments

@Saancreed
Copy link

Input:

using unsafe NvapiQueryInterface = delegate* unmanaged[Cdecl]<uint, nint>;

Output:

using NvapiQueryInterface = delegate* unmanaged[Cdecl]<uint, nint>;

Expected behavior:

unsafe keyword should have been preserved, as removing it leads to a compilation error:

Pointers and fixed size buffers may only be used in an unsafe context (CS0214)

CSharpier version is 0.30.3, and it reports Error ./Program.cs - Failed syntax tree validation. when ran from the CLI.

@belav
Copy link
Owner

belav commented Dec 28, 2024

Thanks for the report! I'll cut a release for this now, it should be out shortly.

@Saancreed
Copy link
Author

That was blazingly fast, thank you! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants