Skip to content

Commit f50fdb9

Browse files
committed
Fix nullable annotations in ProtoWireValue
1 parent 598f944 commit f50fdb9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/ProtoUntyped/ProtoWireValue.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ public readonly struct ProtoWireValue
1212
[FieldOffset(0)] private readonly string? _stringValue;
1313
[FieldOffset(0)] private readonly byte[]? _bytesValue;
1414
[FieldOffset(0)] private readonly ProtoWireObject? _message;
15-
[FieldOffset(0)] private readonly int[] _int32ArrayValue;
16-
[FieldOffset(0)] private readonly long[] _int64ArrayValue;
15+
[FieldOffset(0)] private readonly int[]? _int32ArrayValue;
16+
[FieldOffset(0)] private readonly long[]? _int64ArrayValue;
1717
[FieldOffset(8)] private readonly int _int32Value;
1818
[FieldOffset(8)] private readonly long _int64Value;
1919
[FieldOffset(16)] private readonly ProtoWireValueType _type;
@@ -68,9 +68,9 @@ public ProtoWireValue(long value)
6868

6969
public ProtoWireObject MessageValue => _type == ProtoWireValueType.Message ? _message! : ProtoWireObject.Empty;
7070

71-
public int[] Int32ArrayValue => _type == ProtoWireValueType.Int32Array ? _int32ArrayValue : Array.Empty<int>();
71+
public int[] Int32ArrayValue => _type == ProtoWireValueType.Int32Array ? _int32ArrayValue! : Array.Empty<int>();
7272

73-
public long[] Int64ArrayValue => _type == ProtoWireValueType.Int64Array ? _int64ArrayValue : Array.Empty<long>();
73+
public long[] Int64ArrayValue => _type == ProtoWireValueType.Int64Array ? _int64ArrayValue! : Array.Empty<long>();
7474

7575
public int Int32Value => _type == ProtoWireValueType.Int32 ? _int32Value : default;
7676

0 commit comments

Comments
 (0)