Skip to content

Commit e1eb9a8

Browse files
committed
yes, it works
1 parent eba23cb commit e1eb9a8

File tree

3 files changed

+8
-12
lines changed

3 files changed

+8
-12
lines changed

src/sci/impl/analyzer.cljc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -601,10 +601,10 @@
601601
binding-name (if (symbol? t)
602602
(vary-meta binding-name
603603
assoc :tag-class
604-
(or (interop/resolve-type-hint ctx t)
605-
(records/resolve-record-class ctx t)
606-
(throw-error-with-location
607-
(str "Unable to resolve classname: " t) t)))
604+
(delay (or (interop/resolve-type-hint ctx t)
605+
(records/resolve-record-class ctx t)
606+
(throw-error-with-location
607+
(str "Unable to resolve classnamex: " t) t))))
608608
binding-name)])
609609
v (analyze ctx binding-value)
610610
new-iden (gensym)
@@ -1064,7 +1064,7 @@
10641064
(areduce args idx _ret nil
10651065
(when-let [t (:tag-class (meta (aget args idx)))]
10661066
(vreset! has-types? true)
1067-
(aset arg-types idx t)))))
1067+
(aset arg-types idx (force t))))))
10681068
(with-meta (sci.impl.types/->Node
10691069
(eval/eval-instance-method-invocation
10701070
ctx bindings instance-expr meth-name field-access args arg-count

src/sci/impl/resolve.cljc

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@
173173
#?@(:clj [[tag tag-class] (if-let [t (:tag m)]
174174
[t (:tag-class m)]
175175
(when-let [m (meta k)]
176-
[(:tag m)]))])
176+
[(:tag m) (:tag-class m)]))])
177177
mutable? (when track-mutable?
178178
(when-let [m (some-> k meta)]
179179
#?(:clj (or (:volatile-mutable m)
@@ -194,11 +194,7 @@
194194
nil))
195195
#?@(:clj [tag (with-meta
196196
{:tag tag
197-
:tag-class (or tag-class
198-
(interop/resolve-type-hint ctx tag)
199-
(records/resolve-record-class ctx tag)
200-
(throw-error-with-location
201-
(str "Unable to resolve classname: " tag) tag))})])
197+
:tag-class tag-class})])
202198
mutable? (vary-meta assoc :mutable true))]
203199
v))]
204200
[k v]))

test/sci/interop_test.cljc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545

4646
#?(:clj
4747
(deftest clojure-parity-tests
48-
(let [classes {:classes {'PublicFields PublicFields}}]
48+
(let [classes {:classes {'PublicFields PublicFields}}]
4949
(doseq [expr ['(.-x (PublicFields.))
5050
'(.x (PublicFields.))
5151
'(. (PublicFields.) instanceFoo)

0 commit comments

Comments
 (0)