From 719b91a327141439e49e8ea3563e0d834e4fda2a Mon Sep 17 00:00:00 2001 From: Thomas BESSOU Date: Wed, 26 Jun 2024 15:48:59 +0200 Subject: [PATCH] Parenthesized expression support in auto_type --- dsl_auto_type/src/auto_type/expression_type_inference.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dsl_auto_type/src/auto_type/expression_type_inference.rs b/dsl_auto_type/src/auto_type/expression_type_inference.rs index 72dfb7f335ae..a63bf225f80e 100644 --- a/dsl_auto_type/src/auto_type/expression_type_inference.rs +++ b/dsl_auto_type/src/auto_type/expression_type_inference.rs @@ -91,6 +91,9 @@ impl TypeInferrer<'_> { (syn::Expr::Group(syn::ExprGroup { expr, .. }), type_hint) => { return self.try_infer_expression_type(expr, type_hint) } + (syn::Expr::Paren(syn::ExprParen { expr, .. }), type_hint) => { + return self.try_infer_expression_type(expr, type_hint) + } ( syn::Expr::Tuple(syn::ExprTuple { elems: expr_elems, ..