Add unit tests for variable shadowing.

This commit is contained in:
Calvin Rose
2026-03-15 13:34:12 -05:00
parent 980999c97b
commit 6c2f08ef49
+6 -1
View File
@@ -150,5 +150,10 @@
(check-lint-compile '(g 1 2 :z) "g lint 1")
(check-lint-compile '(g 1 2 :z 4 5) "g lint 2")
(end-suite)
# Variable shadowing linting
(def outer1 "a")
(check-lint-compile '(def outer1 "b") "shadow global-to-global")
(check-lint-compile '(let [outer1 "b"] outer1) "shadow local-to-global")
(check-lint-compile '(do (def x "b") (def x "c")) "shadow local-to-local")
(end-suite)