From 25e1fb45db5c31faff0dab4d26737d9800623742 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Sun, 13 Feb 2022 10:52:44 +0100 Subject: [PATCH] widl: Fix missing support for struct / union parameterized type replacement. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit And we can just pass them through, as with other class types. This fixes widl not accepting EventRegistrationToken method argument type in a parameterized type. Signed-off-by: RĂ©mi Bernon --- tools/widl/typetree.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/widl/typetree.c b/tools/widl/typetree.c index 800ddf77219..3ad140d520c 100644 --- a/tools/widl/typetree.c +++ b/tools/widl/typetree.c @@ -1157,6 +1157,9 @@ static type_t *replace_type_parameters_in_type(type_t *type, typeref_list_t *ori case TYPE_INTERFACE: case TYPE_RUNTIMECLASS: case TYPE_DELEGATE: + case TYPE_STRUCT: + case TYPE_ENCAPSULATED_UNION: + case TYPE_UNION: return type; case TYPE_PARAMETER: if (!orig || !repl) return NULL; @@ -1194,9 +1197,6 @@ static type_t *replace_type_parameters_in_type(type_t *type, typeref_list_t *ori if (t->type_type != TYPE_PARAMETERIZED_TYPE) return find_parameterized_type(type, repl); repl = replace_type_parameters_in_type_list(type->details.parameterized.params, orig, repl); return replace_type_parameters_in_type(t, t->details.parameterized.params, repl); - case TYPE_STRUCT: - case TYPE_ENCAPSULATED_UNION: - case TYPE_UNION: case TYPE_MODULE: case TYPE_COCLASS: case TYPE_APICONTRACT: