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
reflect: inherit all bits of flagRO in Value.Addr()
Currently, Value.Addr() collapses flagRO, which is a combination of
flagEmbedRO and flagStickyRO, to flagStickyRO. This causes exported
fields of unexported anonymous field from Value.Addr().Elem() read only.
This commit fix this by inheriting all bits of flagRO from origin
value in Value.Addr(). This should be safe due to following reasons:
* Result of Value.Addr() is not CanSet() because of it is not CanAddr()
but not flagRO.
* Addr().Elem() get same flagRO as origin, so it should behave same as
origin in CanSet().
Fixes#32772.
0 commit comments