Repository navigation
Simplify PbList implementation, fix freezing - #626
Conversation
|
I refactored the implementation a little bit and I think this version looks good. Only problem is removing We could fix the two bugs (freezing the list allows updates in aliased lists, freezing the list does not freeze elements) without removing any classes, but it would require copying the mutable list (deep or shallow depending on the intended semantics) when creating a I say we keep this PR for the next major release (maybe we can create a branch for it). Fixing the bug without changing the API requires more work in runtime. |
A field value is one of these: - PbListBase (for `repeated`, PbList after #626) - PbMap - int - double - bool - String - List<int> (for `bytes`) - GeneratedMessage `ByteData` is not a valid field value type, so remove the `ByteData` cases when checking field value types.
|
GitHub's "request review" button doesn't seem work for non-collaborators.. @rakudrama PTAL. |
PbListis now a single classFreezing no longer creates a new list, sets
_isReadOnlyflag of the currentlist
Freezing
PbListnow freezes elementsPbListimplementation is now consistent withPbMap.Fixes #624.
cl/450278877