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
Visual Studio 17.6 Preview 2
C# Tools 4.6.0-2.23151.17+1314d090671dc1a1500c5303c4b5ae9150f40d98
Steps to Reproduce:
refstructOk{publicrefintRef;publicOk(refintx){Ref=refx;// OK}}refstructError(refintx){publicrefintRef=refx;// CS9077. Isn't this a bug?}refstructForReference([UnscopedRef]refintx){publicrefintRef=refx;// OKpublicvoidM1(refintx){Ref=refx;// CS9077. This is correct.}publicvoidM2([UnscopedRef]refintx){Ref=refx;// OK}}
Expected Behavior:
No error on public ref int Ref = ref x;, for consistency with Ok struct.