File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 401401 (if (gobject/containsKey nil nil ) true false )]))]
402402 (is (nil? (re-find #"truth_" code))))))
403403
404+ (deftest test-amp-as-local-clj-2954
405+ (testing " & disallowed as local binding"
406+ (try
407+ (env/with-compiler-env (env/default-compiler-env )
408+ (compile-form-seq
409+ '[(let [& 42 ] &)]))
410+ (catch Throwable t
411+ (is (instance? clojure.lang.ExceptionInfo t))
412+ (is (.startsWith (-> t ex-cause ex-message) " Can't use & as a local binding" ))))
413+ (try
414+ (env/with-compiler-env (env/default-compiler-env )
415+ (compile-form-seq
416+ '[(let* [& 42 ] &)]))
417+ (catch Throwable t
418+ (is (instance? clojure.lang.ExceptionInfo t))
419+ (is (.startsWith (-> t ex-cause ex-message) " Can't use & as a local binding" ))))
420+ (try
421+ (env/with-compiler-env (env/default-compiler-env )
422+ (compile-form-seq
423+ '[(loop* [& 42 ] &)]))
424+ (catch Throwable t
425+ (is (instance? clojure.lang.ExceptionInfo t))
426+ (is (.startsWith (-> t ex-cause ex-message) " Can't use & as a local binding" ))))))
427+
404428; ; CLJS-1225
405429
406430(comment
You can’t perform that action at this time.
0 commit comments