Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CLJS-519: namespace aliased keywords throw Clojure reader exception
`forms-seq` was not as lazy at it should have been, we might accidentally look ahead past the ns form and consume a namespace aliased keyword before we get a chance to apply the side effects of the `parse 'ns` multimethod in the analyzer. We were incorrectly setting `*ns*` in `forms-seq` to `*ana/*reader-ns*` instead of `*ana/cljs-ns*` which is what the analyzer actually side effects.
- Loading branch information
1 parent
8220ebd
commit 4a04114
Showing
5 changed files
with
21 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
(ns cljs.keyword-other) | ||
|
||
(defn foo [a b] | ||
(+ a b)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
(ns cljs.keyword-test | ||
(:require [cljs.keyword-other :as other])) | ||
|
||
(defn test-keyword [] | ||
(assert (= ::other/foo :cljs.keyword-other/foo))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters