File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 1067
1067
(assoc :info nil )))))
1068
1068
1069
1069
(or
1070
- ; ; If the tag isn't Function, try to resolve it
1071
- ; ; similar to the super case above
1070
+ ; ; If the tag isn't Function or undefined,
1071
+ ; ; try to resolve it similar to the super case above
1072
1072
(let [tag (:tag info')]
1073
- (when (and tag (not= ' Function tag))
1073
+ (when (and tag (not ( contains? '#{ Function undefined} tag) ))
1074
1074
(resolve-extern (into [tag] (next pre)) externs top
1075
1075
(-> ret
1076
1076
(assoc :resolved [])
Original file line number Diff line number Diff line change 53
53
(is (= '[Console]
54
54
(-> (ana/resolve-extern '[console] externs) :resolved )))
55
55
(is (= '[Console prototype log]
56
- (-> (ana/resolve-extern '[console log] externs) :resolved )))))
56
+ (-> (ana/resolve-extern '[console log] externs) :resolved )))
57
+ (is (= '[undefined]
58
+ (-> (ana/resolve-extern '[undefined] externs) :resolved )))))
57
59
58
60
(comment
59
61
(clojure.test/test-vars [#'test-resolve-extern])
62
64
; ; succeeds
63
65
(ana/resolve-extern '[console] externs)
64
66
(ana/resolve-extern '[console log] externs)
67
+ (ana/resolve-extern '[undefined] externs)
65
68
66
69
)
67
70
You can’t perform that action at this time.
0 commit comments