typechecker fails when checking a Protocol whose method gets called using dot notation

Description

The error message is

No method in multimethod 'check' for dispatch value: :host-interop

The following is a minimal test case which fails:

core.clj

It works, however, when calling (get-data in) instead of (.get-data in).

Environment

Clojure 1.6.0, core.typed 0.2.44

Activity

Show:
import
June 18, 2014, 11:40 AM

Comment made by: zilti

As of version 0.2.51, this still happens reliably.

Ambrose Bonnaire-Sergeant
April 13, 2014, 6:44 AM
Nicola Mometto
April 13, 2014, 1:13 AM

tools.analyzer.jvm returns a :host-interop node when, like in this case, it encounters an interop form of the form (.foo bar) and can't determine whether it's a no-arg method call or a field-access.

I don't know enough about core.typed internals but it looks like there should be an add-check-method for :host-interop that behaves like check methods for :instance-field/:instance-call that resolve to runtime reflection (not :validated)

Completed

Assignee

Ambrose Bonnaire-Sergeant

Reporter

import