File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed
module-check/src/main/clojure/clojure/core/typed Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 464
464
r (get/invoke-get expr expected :cargs cargs)]
465
465
(if-not (#{cu/not-special} r)
466
466
r
467
- (method/check-invoke-method check expr expected false
467
+ (method/check-invoke-method check expr expected
468
468
:cargs cargs))))
469
469
470
470
; FIXME should be the same as (apply hash-map ..) in invoke-apply
1032
1032
r (nth/invoke-nth check expr expected :cargs cargs)]
1033
1033
(if-not (#{cu/not-special} r)
1034
1034
r
1035
- (method/check-invoke-method check expr expected false
1035
+ (method/check-invoke-method check expr expected
1036
1036
:cargs cargs))))
1037
1037
1038
1038
; nthnext
1457
1457
(let [spec (static-method-special expr expected)]
1458
1458
(if (not= :default spec)
1459
1459
spec
1460
- (method/check-invoke-method check expr expected false ))))
1460
+ (method/check-invoke-method check expr expected))))
1461
1461
1462
1462
(add-check-method :instance-call
1463
1463
[expr & [expected]]
1475
1475
(let [spec (instance-method-special expr expected)]
1476
1476
(if (not= :default spec)
1477
1477
spec
1478
- (method/check-invoke-method check expr expected true ))))
1478
+ (method/check-invoke-method check expr expected))))
1479
1479
1480
1480
(add-check-method :static-field
1481
1481
[expr & [expected]]
Original file line number Diff line number Diff line change 14
14
[clojure.core.typed.method-override-env :as mth-override]))
15
15
16
16
; [MethodExpr Type Any -> Expr]
17
- (defn check-invoke-method [check-fn {c :class method-name :method :keys [args env] :as expr} expected inst?
17
+ (defn check-invoke-method [check-fn {c :class method-name :method :keys [args env] :as expr} expected
18
18
& {:keys [ctarget cargs method-override]}]
19
19
{:pre [((some-fn nil? r/TCResult?) expected)
20
- ((some-fn nil? r/Type?) method-override)
21
- (or (not ctarget) inst?)]
20
+ ((some-fn nil? r/Type?) method-override)]
22
21
:post [(-> % u/expr-type r/TCResult?)
23
22
(vector? (:args %))]}
24
23
(binding [vs/*current-env* env
25
24
vs/*current-expr* expr]
26
- (let [method (cu/MethodExpr->Method expr)
25
+ (let [inst? (= :instance-call (:op expr))
26
+ method (cu/MethodExpr->Method expr)
27
27
msym (cu/MethodExpr->qualsym expr)
28
28
rfin-type (or method-override
29
29
(when msym
Original file line number Diff line number Diff line change 152
152
; rewrite nth type to be more useful when we have an exact (and interesting) index.
153
153
(nat-value? num-t)
154
154
(method/check-invoke-method
155
- check-fn expr expected false
155
+ check-fn expr expected
156
156
:method-override (nth-function-type (-> num-t :val ))
157
157
:cargs cargs)
158
158
:else cu/not-special)))
You can’t perform that action at this time.
0 commit comments