We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
UnsafeAccessor
class InstanceAccessors { public InstanceAccessors() { } [UnsafeAccessor(UnsafeAccessorKind.Constructor)] public extern InstanceAccessors UnsafeNonStaticAccessorForConstructor(); } void Test() { (new InstanceAccessors()).InstanceAccessors(); // Works }
Per the proposal #81741, the attribute should only be effective on static methods. It's also not clear what it means on instance methods.
@AaronRobinsonMSFT
The text was updated successfully, but these errors were encountered:
Tagging subscribers to this area: @dotnet/area-system-runtime-compilerservices See info in area-owners.md if you want to be subscribed.
area-System.Runtime.CompilerServices
Sorry, something went wrong.
the attribute should only be effective on static methods
Yep. I will add a run-time check for CoreCLR and a compile time check in NativeAOT.
/cc @fanyang-mono @jkotas
AaronRobinsonMSFT
Successfully merging a pull request may close this issue.
Per the proposal #81741, the attribute should only be effective on static methods. It's also not clear what it means on instance methods.
@AaronRobinsonMSFT
The text was updated successfully, but these errors were encountered: