Skip to content

readonlyDefault for bytes field returns mutable list #747

@osa1

Description

@osa1

Same bug for map fields: #705

Repro:

syntax = "proto3";

message M1 {
  bytes b = 1;
}
import '../test.pb.dart';

void main() {
  M1 m = M1();
  m.b.add(0);
  m.b.add(1);
  print(m);
}

The last line prints empty bytes field.

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