Allow 'ref readonly struct' for 'readonly ref struct' #8752
Unanswered
gafter
asked this question in
Language Ideas
Replies: 2 comments
-
Beta Was this translation helpful? Give feedback.
0 replies
-
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 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
@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
.Beta Was this translation helpful? Give feedback.
All reactions