diff --git a/src/check_builtin.cpp b/src/check_builtin.cpp index 00065b701..b4ab960d6 100644 --- a/src/check_builtin.cpp +++ b/src/check_builtin.cpp @@ -3146,6 +3146,13 @@ gb_internal bool check_builtin_procedure(CheckerContext *c, Operand *operand, As } ast_node(se, SelectorExpr, arg0); + if (unparen_expr(se->expr)->kind == Ast_SelectorExpr) { + gbString x = expr_to_string(arg0); + error(ce->args[0], "Chained expressions are not allowed for '%.*s', got '%s' ", LIT(builtin_name), x); + gb_string_free(x); + return false; + + } Operand x = {}; check_expr(c, &x, se->expr);