Details
-
Type:
Defect
-
Status:
Resolved
-
Priority:
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)
Note that using interface System.IAsyncState in the example is arbitrary, I just chose some platform interface with properties.
I have previously used reify to implement interfaces and passed those objects to C# code where the properties have been successfully accessed so the problem seems to occur just when trying to access the property from Clojure.