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
publicrefstructRS{}publicclassBase{publicvirtual RS this[scopedRSrs]{get=>default;}publicvirtual RS this[scopedRSrs,int_]{get=>default;set{}}}publicclassC:Base{publicoverride RS this[RSrs]{get=>default;}// error CS8987: The 'scoped' modifier of parameter 'rs' doesn't match overridden or implemented member.publicoverride RS this[RSrs,int_]{get=>default;set{}}// no error}
Expected: Both commented lines have errors Actual: Only the first commented line has an error. It seems like adding a set accessor to a similar indexer declaration removes the error.
The text was updated successfully, but these errors were encountered:
I think the issue is here. It is assumed that if setter is present, then only setter needs to be checked, but for the scoped checks to actually run, there needs to be a ref or ref struct output, as well as input, which is only found on the getter.
Expected: Both commented lines have errors
Actual: Only the first commented line has an error. It seems like adding a set accessor to a similar indexer declaration removes the error.
The text was updated successfully, but these errors were encountered: