From 9203fcaeb5ab06a294a7135a576de7811350db94 Mon Sep 17 00:00:00 2001 From: "Brandon T. Willard" Date: Sat, 16 Mar 2019 23:19:49 -0500 Subject: [PATCH] Check arguments in with-decorator tag Fixes #1757. --- hy/core/macros.hy | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hy/core/macros.hy b/hy/core/macros.hy index 824a8e5..5e06751 100644 --- a/hy/core/macros.hy +++ b/hy/core/macros.hy @@ -240,6 +240,8 @@ name (i.e. `sys.argv[0]`). (deftag @ [expr] "with-decorator tag macro" + (if (empty? expr) + (macro-error expr "missing function argument")) (setv decorators (cut expr None -1) fndef (get expr -1)) `(with-decorator ~@decorators ~fndef))