Uh oh!
There was an error while loading. Please reload this page.
Make ImmutableArray readonly - #44640
Conversation
ghost
commented
Nov 13, 2020
Tagging subscribers to this area: @eiriktsarpalis, @jeffhandley DetailsIssue Details
|
| bool successful; | ||
| T[]? oldArray = Volatile.Read(ref location.array); | ||
| T[]? oldArray = Volatile.Read(ref Unsafe.As<ImmutableArray<T>, T[]?>(ref location)); |
There was a problem hiding this comment.
Can this use just Unsafe.AsRef to just cast-away the readonly-ness? Unsafe.As is too big hammer.
jkotas
commented
Nov 13, 2020
This may be a problem for Roslyn. @jaredpar ? |
jaredpar
commented
Nov 16, 2020
It's a headache to update but not a blocker. |
eiriktsarpalis
commented
Nov 17, 2020
LGTM. Thank you for your contribution. |
Closes#334 .
I noticed that #44629 does not come with api review. I think this can be done similarly.
As an implementation requirement, this PR brings a new reference of S.R.CS.Unsafe to netstandard1.0 target. It this acceptable?