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
No error is reported for x += y below. Verified the repro with csc.exe 3.11 and latest 4.4 preview.
usingSystem;refstructS{publicstaticimplicitoperatorS(Span<int>s)=>default;publicstaticSoperator+(Sa,Sb)=>b;}classProgram{staticvoidF(refSx){Span<int>s=stackallocint[10];Sy=s;x+=y;// no errorx=x+y;// error CS8352: 'y' ... may expose referenced variables outside of their declaration scope}}
The text was updated successfully, but these errors were encountered:
No error is reported for
x += y
below. Verified the repro with csc.exe 3.11 and latest 4.4 preview.The text was updated successfully, but these errors were encountered: