Skip to content

Freezing a message does not freeze bytes fields, allows modifying the message after the freeze #746

@osa1

Description

@osa1

We represent bytes fields as Uint8List, which doesn't support freezing. Repro:

syntax = "proto3";

message M1 {
  bytes b = 1;
}
void main() {
  M1 m = M1();
  m.b = <int>[0];
  m.freeze();
  m.b.add(1);
  print(m);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions