diff --git a/third-party/thrift/src/thrift/lib/cpp2/op/detail/StructPatch.h b/third-party/thrift/src/thrift/lib/cpp2/op/detail/StructPatch.h index f83d6b5fe0d71..9e042684ceddf 100644 --- a/third-party/thrift/src/thrift/lib/cpp2/op/detail/StructPatch.h +++ b/third-party/thrift/src/thrift/lib/cpp2/op/detail/StructPatch.h @@ -371,9 +371,10 @@ class BaseEnsurePatch : public BaseClearPatch { /// object. template decltype(auto) patch() { - using Ret = op::get_native_type; + using FieldPatchType = typename patch_type::underlying_type; + using Ret = op::get_native_type; return *reinterpret_cast( - typeErasedPatchImpl>( + typeErasedPatchImpl>( static_cast(*this))); }