-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add support for unsafe
keyword
#62
Comments
similarly, I've noticed that it doesn't support the |
@ChaseFlorell I think that should be a separate PR. |
as for the IntPR -> nint problem, that might require special handling. The types are taken from the compiler, I do not know why it's falling back to nint. |
I think the fallback is due to the use of |
Getting the Given an ((Microsoft.CodeAnalysis.CSharp.Symbols.SourceMemberMethodSymbol)
((Microsoft.CodeAnalysis.CSharp.Symbols.PublicModel.MethodSymbol)
((Microsoft.CodeAnalysis.IMethodSymbol)method).ConstructedFrom).UnderlyingMethodSymbol).IsUnsafe 😬 You can see the internal implementation here: |
Hi @ChaseFlorell, I've added a fix for |
Thanks for implementing
init
so quickly last time!I've found out, that the
unsafe
keyword is missing in the interface generation.It's necessary for using pointer types
Example:
Should generate:
On a side note, I've also seen that
IntPtr
gets converted tonint
- they are syntactically the same but slightly differ in semantics, where IntPtr always denotes "unsafe" pointers and nint just being a representation of the native integer size.Nothing too critical but just wanted to point it out
The text was updated successfully, but these errors were encountered: