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
Expected Behavior:
The order of 'ref' and 'readonly' should not matter; I can either use 'readonly ref struct' or 'ref readonly struct' to declare readonly ref-like types.
Actual Behavior:
'ref readonly struct' is not allowed. looks like ref struct is a compound keyword like partial class.
Thanks for reporting this.
Since this is a known issue, I'll go ahead and close as duplicate. @alrz is close to getting this fix (dotnet/roslyn#23533) into C# 7.3.
I'm happy to close my issue (#1530) in favour of this one although it's perhaps the more general of the two. Has it already been decided that relaxation should occur only with struct declarations (instead of return value type declarations)?
@mazhou-msft commented on Thu Mar 01 2018
Version Used:
Visual Studio 2017 27428.0.d15.7
Steps to Reproduce:
Expected Behavior:
The order of 'ref' and 'readonly' should not matter; I can either use 'readonly ref struct' or 'ref readonly struct' to declare readonly ref-like types.
Actual Behavior:
'ref readonly struct' is not allowed. looks like
ref struct
is a compound keyword likepartial class
.@CyrusNajmabadi commented on Thu Mar 01 2018
This is not a compiler issue, but a request for a change in the language. as such, this should be filed over at dotnet/csharplang. Thanks!
@alrz commented on Thu Mar 01 2018
this is already championed (#946)
@jcouv commented on Fri Mar 02 2018
Thanks for reporting this.
Since this is a known issue, I'll go ahead and close as duplicate. @alrz is close to getting this fix (dotnet/roslyn#23533) into C# 7.3.
@gafter commented on Thu May 17 2018
This was not championed or fixed. What was fixed was the ordering of
ref
andpartial
. There is still an issue with the ordering ofref
andreadonly
.The text was updated successfully, but these errors were encountered: