Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common/types/pb/type.go
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ func unwrap(desc description, msg proto.Message) (any, bool, error) {
}
return v.GetValue(), true, nil
}
return msg, false, nil
return unwrapDynamic(desc, msg.ProtoReflect())
Comment thread
TristonianJones marked this conversation as resolved.
}

// unwrapDynamic unwraps a reflected protobuf Message value.
Expand Down
4 changes: 4 additions & 0 deletions common/types/pb/type_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,10 @@ func TestTypeDescriptionMaybeUnwrap(t *testing.T) {
in: dpb.New(time.Duration(345)),
out: time.Duration(345),
},
{
in: struct{ proto.Message }{wrapperspb.Int32(1234)},
out: int32(1234),
},
}
for _, tc := range tests {
typeName := string(tc.in.ProtoReflect().Descriptor().FullName())
Expand Down