ClojureCLR

Reifying properties does not work when called from Clojure

Details

  • Type: Defect Defect
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Declined
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    Windows 7 x64, Clojure CLR 1.6.0

Description

When implementing an interface with reify there seems to be a problem when trying to access the reifyed property from Clojure. Here's how to reproduce:

(def o 
  (reify IAsyncResult
    (get_AsyncState [_]
             (println "hello"))))

(.AsyncState o)

causes

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocatio
n. ---> System.MissingMethodException: Cannot find instance field/property/member name AsyncState

Using

(.get_AsyncState o)
works, though.

Note that using interface System.IAsyncState in the example is arbitrary, I just chose some platform interface with properties.

Activity

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: