From 9bff606ee9ea72a05d2370b0d32f40d35f946b39 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Tue, 11 Aug 2015 13:55:00 +0200 Subject: [PATCH] Test that assigning to a builtin fails Signed-off-by: Gergely Nagy --- tests/compilers/test_ast.py | 6 ++++++ 1 file changed, 6 insertions(+) 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)")