diff --git a/tests/compilers/test_ast.py b/tests/compilers/test_ast.py index 54dc8d4..0a6c36e 100644 --- a/tests/compilers/test_ast.py +++ b/tests/compilers/test_ast.py @@ -551,3 +551,9 @@ def test_defn(): cant_compile("(defn \"hy\" [] 1)") cant_compile("(defn :hy [] 1)") can_compile("(defn &hy [] 1)") + + +def test_setv_builtins(): + """Ensure that assigning to a builtin fails""" + cant_compile("(setv nil 42)") + cant_compile("(defn get [&rest args] 42)")