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
how should the compiler deal with well-known members that are unexpectedly marked as caller-unsafe? (some are ok, such as UnsafeHelpers for inline arrays, but what about others?)
Speclet: https://github.com/dotnet/csharplang/blob/main/proposals/unsafe-evolution.md
Proposal issue: dotnet/csharplang#9704
Feature branch: https://github.com/dotnet/roslyn/tree/features/UnsafeEvolution
MemorySafetyRulesattributeExtern_*)RulesAttribute_ReferencedInSource)RulesAttribute_Synthesizedbut with LangVer)Extern_Method)Pointer_Dereference_*)Pointer_MemberAccess_*)Pointer_ElementAccess_*)Member_FunctionPointer) and conversion (seeMember_Method_ConvertToFunctionPointer)FixedSizeBuffer_*)StackAlloc_*)Member_Operator_*)Member_Property_Attribute)withexpressionsnameof(seeMember_Method_NameOf)Currentinforeach(seeMember_Current_*),Disposeinusing(seeMember_Dispose_*),Deconstructin deconstructino (seeMember_Deconstruct),lock(seeMember_LockObject),Member_InterpolatedStringHandler)Member_Interceptor, we only check intercepted)new()constraintMember_Constructor_This)Member_Constructor_Attribute)RequiresUnsafeAttributeMember_Lambda), static constructors and finalizers (seeRequiresUnsafeAttribute_ReferencedInSource)RequiresUnsafeAttribute_ReferencedInSource)Extern_Method_Explicit)*_Override,*_Implementation,*_Hiding,Extern_Method_Override)unsafe*_UsingAlias_*)using staticdirectives (missing tests?)MemorySafetyRulesAttributeRequiresUnsafeAttributeUnsafeHelpersfor inline arrays, but what about others?)Activator.CreateInstance<T>()be requires-unsafe?[/-]dynamicbe marked as requires-unsafe?RequiresUnsafeattribute and compiler flag be considered experimental in .NET 11?AllowUnsafe