diff --git a/src/compiler/sema_expr.c b/src/compiler/sema_expr.c index b13593e10..bdd3ed5ec 100644 --- a/src/compiler/sema_expr.c +++ b/src/compiler/sema_expr.c @@ -9158,6 +9158,7 @@ static inline bool sema_expr_analyse_ct_arg(SemaContext *context, Type *infer_ty } case TOKEN_CT_VAREF: { + SEMA_DEPRECATED(expr, "'$varef' is deprecated together with '&' arguments."); // A normal argument, this means we only evaluate it once. unsigned index = 0; ASSIGN_EXPR_OR_RET(Expr *arg_expr, sema_expr_analyse_ct_arg_index(context, exprptr(expr->ct_arg_expr.arg), &index), false); diff --git a/test/test_suite/macros/macro_untyped_varargs_2.c3t b/test/test_suite/macros/macro_untyped_varargs_2.c3t index c4e12f584..8621fb3ef 100644 --- a/test/test_suite/macros/macro_untyped_varargs_2.c3t +++ b/test/test_suite/macros/macro_untyped_varargs_2.c3t @@ -34,9 +34,9 @@ macro foo3(...) macro @foo4(...) { - $typeof(*$varef[0]) a = *$varef[0]; - *$varef[0] = *$varef[1]; - *$varef[1] = a; + $typeof($vaexpr[0]) a = $vaexpr[0]; + $vaexpr[0] = $vaexpr[1]; + $vaexpr[1] = a; } fn int ping(int val) {