From 663182abdf0cb34c1b4331bfe29cefe14e053f73 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Thu, 22 Feb 2024 13:00:27 -0500 Subject: Implement concatenation --- typecheck.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'typecheck.c') diff --git a/typecheck.c b/typecheck.c index 781b6ffc..ad1062d1 100644 --- a/typecheck.c +++ b/typecheck.c @@ -447,7 +447,7 @@ type_t *get_type(env_t *env, ast_t *ast) if (!type_eq(lhs_t, rhs_t)) code_err(ast, "The type on the left side of this concatenation doesn't match the right side: %T vs. %T", lhs_t, rhs_t); - if (lhs_t->tag == ArrayType && lhs_t->tag == StringType) + if (lhs_t->tag == ArrayType || lhs_t->tag == StringType) return lhs_t; code_err(ast, "Only array/string value types support concatenation, not %T", lhs_t); -- cgit v1.2.3