File tree Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -12178,6 +12178,8 @@ reduces them without incurring seq initialization"
12178
12178
Object
12179
12179
(findInternedVar [this sym]
12180
12180
(let [k (munge (str_ sym))]
12181
+ ; ; FIXME: this shouldn't need ^boolean due to GCL library analysis,
12182
+ ; ; but not currently working
12181
12183
(when ^boolean (gobject/containsKey obj k)
12182
12184
(let [var-sym (symbol (str_ name) (str_ sym))
12183
12185
var-meta {:ns this}]
Original file line number Diff line number Diff line change 37
37
(is (= 'any (get-in ns [:defs 'get :ret-tag ])))
38
38
(is (= 'array (get-in ns [:defs 'getKeys :ret-tag ])))))
39
39
40
+ (comment
41
+ ; ; works
42
+ (get-in (externs/analyze-goog-file " goog/object/object.js" )
43
+ [:defs 'containsKey :ret-tag ])
44
+ )
45
+
40
46
(deftest test-parse-super
41
47
(let [info (->
42
48
(filter
Original file line number Diff line number Diff line change 394
394
(:import [goog.history Html5History]))
395
395
(Html5History. )]
396
396
{} true ))))))
397
+
398
+ ; ; FIXME: infers any instead of boolean, nothing wrong w/ the externs parsing
399
+ ; ; but this definitely does not work at the moment
400
+ #_(deftest test-goog-infer
401
+ (is (= 'boolean
402
+ (:tag
403
+ (env/with-compiler-env (env/default-compiler-env )
404
+ (ana/analyze-form-seq
405
+ '[(ns test.foo
406
+ (:require [goog.object :as gobject]))
407
+ (gobject/containsKey (js-object ) " foo" )]
408
+ {} true ))))))
You can’t perform that action at this time.
0 commit comments