Cannot yet expose type <enumType> as a SEXP

Sep 8, 2015 at 8:23 PM
I was running with a previous version of rClr (7-2 I think) and was using a clrCall to call a function with the following signature on an object:
public enumType[] getTypes()
It worked in 7-2 and I got string representations of each enumType in the array, however, I just switched to 7-4 hoping it'll go a memory leak I'm seeing go away, but now whenever I try this call I get the following message:
Cannot yet expose type NameSpace.Object+enumType as a SEXP

Is there some workaround to get the previous behavior but avoid the memory leak?
Sep 12, 2015 at 11:33 PM
If you can modify the c# (or whichever language targeting .NET), I'd write an explicit helper method returning a string[]. You can also write a new wrapper assembly if the original code should not be modified.

In the broader context, converting "less-obvious" types brings interesting challenges. A few releases back, I expanded the conversion capabilities for broad categories of objects. problems arise when a sensible dynamic conversion depends on the context. Sometimes, you'd just like, say, a .NET dictionary to be converted to an R list with names. But passing this back from R to .NET can be ambiguous. Many .NET method signatures could conceivably accept an R list as an argument, after proper conversion, but should it be allowed? It requires additional logic for method matching, and likely edge cases.