You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using an explicit this pointer to work around #26688, I am able to take the address of a fixed field, giving me an unmanaged pointer without pinning. If I'm understanding the relaxed restrictions correctly, this should not be possible, as the pointer should only be useable as an indexer.
Both forms were previously illegal, and now the first form is allowed (a bug, I believe). I think we should tighten the constraints and make both forms illegal.
Version Used: C# 7.3 / VS 15.7.1
Steps to Reproduce:
Using an explicit
this
pointer to work around #26688, I am able to take the address of a fixed field, giving me an unmanaged pointer without pinning. If I'm understanding the relaxed restrictions correctly, this should not be possible, as the pointer should only be useable as an indexer.The text was updated successfully, but these errors were encountered: