@@ -705,7 +705,7 @@ using IFunctionTypeInfoBuilderImpl = IFunctionTypeInfoBuilder1;
705
705
class IFunctionTypeInfoBuilder : public IFunctionTypeInfoBuilderImpl {
706
706
public:
707
707
IFunctionTypeInfoBuilder ();
708
-
708
+
709
709
IFunctionTypeInfoBuilder& Implementation (
710
710
TUniquePtr<IBoxedValue> impl) {
711
711
ImplementationImpl (std::move (impl));
@@ -884,13 +884,6 @@ struct TTypeBuilderHelper<TOptional<T>> {
884
884
}
885
885
};
886
886
887
- template <typename T>
888
- struct TTypeBuilderHelper <TAutoMap<T>> {
889
- static TType* Build (const IFunctionTypeInfoBuilder& builder) {
890
- return TTypeBuilderHelper<T>::Build (builder);
891
- }
892
- };
893
-
894
887
template <typename TKey, typename TValue>
895
888
struct TTypeBuilderHelper <TDict<TKey, TValue>> {
896
889
static TType* Build (const IFunctionTypeInfoBuilder& builder) {
@@ -987,6 +980,29 @@ struct TCallableArgsHelper<TArg, TArgs...> {
987
980
}
988
981
};
989
982
983
+ template <typename TArg, typename ... TArgs>
984
+ struct TCallableArgsHelper <TAutoMap<TArg>, TArgs...> {
985
+ static void Arg (
986
+ ICallableTypeBuilder& callableBuilder,
987
+ const IFunctionTypeInfoBuilder& builder)
988
+ {
989
+ callableBuilder.Arg (TTypeBuilderHelper<TArg>::Build (builder))
990
+ #if UDF_ABI_COMPATIBILITY_VERSION_CURRENT >= UDF_ABI_COMPATIBILITY_VERSION(2, 38)
991
+ // XXX: Unfortunately, ICallableTypeBuilder provides Flags
992
+ // method only since UDF ABI 2.38. However, AutoMap flag
993
+ // has been silently ignored by this builder and also by
994
+ // the TTypeBuilderHelper specialization for AutoMap type.
995
+ // Hence, the correct AutoMap type processing is wrapped
996
+ // with this compatibility macro, since the caller of
997
+ // ICallableTypeBuilder has to explicitly set AutoMap flag
998
+ // for the particular argument anyway.
999
+ .Flags (ICallablePayload::TArgumentFlags::AutoMap)
1000
+ #endif
1001
+ ;
1002
+ TCallableArgsHelper<TArgs...>::Arg (callableBuilder, builder);
1003
+ }
1004
+ };
1005
+
990
1006
template <typename TReturn, typename ... TArgs>
991
1007
struct TTypeBuilderHelper <TReturn(*)(TArgs...)> {
992
1008
static TType* Build (const IFunctionTypeInfoBuilder& builder) {
0 commit comments