diff --git a/components/dada-validate/src/validate/validator.rs b/components/dada-validate/src/validate/validator.rs index 1cdad047..5bfb2327 100644 --- a/components/dada-validate/src/validate/validator.rs +++ b/components/dada-validate/src/validate/validator.rs @@ -398,7 +398,11 @@ impl<'me> Validator<'me> { } syntax::ExprData::Parenthesized(parenthesized_expr) => { - self.validate_expr_in_mode(*parenthesized_expr, mode) + let data = self + .validate_expr_in_mode(*parenthesized_expr, mode) + .data(self.tables) + .clone(); + self.add(data, expr) } syntax::ExprData::Tuple(element_exprs) => { diff --git a/dada_tests/parser/parenthesized_expr.dada b/dada_tests/parser/parenthesized_expr.dada index b1cfa7ad..ff606124 100644 --- a/dada_tests/parser/parenthesized_expr.dada +++ b/dada_tests/parser/parenthesized_expr.dada @@ -3,4 +3,5 @@ async fn main() { print(x).await #! OUTPUT 2 x = (1) print(x).await #! OUTPUT 1 + print((3)).await #! OUTPUT 3 } \ No newline at end of file diff --git a/dada_tests/parser/parenthesized_expr/stdout.ref b/dada_tests/parser/parenthesized_expr/stdout.ref index 5f1d0ece..b52e52d0 100644 --- a/dada_tests/parser/parenthesized_expr/stdout.ref +++ b/dada_tests/parser/parenthesized_expr/stdout.ref @@ -1,2 +1,3 @@ 2 1 +3