Reifying properties does not work when called from Clojure

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:

causes

Using

works, though.

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

Environment

Windows 7 x64, Clojure CLR 1.6.0

Activity

Show:

David Miller October 13, 2014 at 4:19 AM

Type hinting allows the property to be accessed. Without type-hinting, equivalent to working with dynamic in C#, a callsite is generated. This callsite does not work with properties – same as C#.

More info at http://clojureclr.blogspot.com/2014/10/reflecting-properties.html

If you have another example, I'd like to see it.

import October 10, 2014 at 6:49 AM

Comment made by: akaranta

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.

Declined

Details

Assignee

Reporter

Priority

Created October 10, 2014 at 6:46 AM
Updated October 13, 2014 at 4:19 AM
Resolved October 13, 2014 at 4:19 AM