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
public ref struct C
{
public C M1(C c, scoped C c1)
{
c = c1++; // error CS8352: Cannot use variable 'scoped C c1' in this context because it may expose referenced variables outside of their declaration scope
return c;
}
public C M2(C c, scoped C c2)
{
c = ++c2; // Unexpected error CS8352: Cannot use variable 'scoped C c2' in this context because it may expose referenced variables outside of their declaration scope
return c;
}
public static C operator ++(scoped C left) => throw null;
}