google / google/protobuf.dart

`readonlyDefault` for bytes field returns mutable list

Open
#747 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Dart
Stars
572
Forks
196
Avg merge
1h 59m
Merged PRs (30d)
2

Description

Same bug for `map` fields: #705

Repro:

```proto
syntax = "proto3";

message M1 {
bytes b = 1;
}
```

```dart
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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.