You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Cleanup] Accept Variant<...> instead of ObjectRef when possible
Prior to the implementation of `Variant<...>` in
#15672, functions that were
polymorphic over an argument type would typically accept an
`ObjectRef` argument, then downcast to an allowed type. This delays
the catching of an error, and can accidentally omit automatic
conversions applied by the FFI.
This commit updates several locations using this pattern to instead
accept a `Variant`, templated over the allowed types. This enables
C++ type checking for C++ callers, standardizes the type-checking in
the FFI for non-C++ callers, and ensures that FFI type conversions are
uniformly applied.
0 commit comments