Hi,

Thanks for the quick reply!

Here's the 2 options, each with its error:
* Option 1
    native getProperties :: Mutable s Tree -> ST s (Iterable (Mutable s (b
extends PropertyState)))
with error:
    -The parameterized method <Iterable<b>>lazy(Lazy<Iterable<b>>) of type
Thunk is not applicable for the arguments (Iterable<capture#1-of ? extends
     PropertyState>)

* Option 2 (my original try)
    native getProperties :: Mutable s Tree -> ST s (Iterable (Mutable s
PropertyState))
with error
    -The parameterized method
<Iterable<PropertyState>>lazy(Lazy<Iterable<PropertyState>>) of type Thunk
is not applicable for the arguments
     (Iterable<capture#1-of ? extends PropertyState>)
Option 2 was actually what I wanted to attach to my original email, but I
had a copy/pasta error in frege my code snippet (tried too many things I
guess).

best,
alex



On Sun, Oct 21, 2018 at 12:05 PM Ingo W. <ingo.wechs...@gmail.com> wrote:

> Hi Alex,
>
> please try
>
>    ... (b extends PropertyState)
>
> instead of b. Also, maybe just PropertyState will do the job as well?
> If so, I would prefer the latter.
>
> The automatic conversion of return values to lists is not supported
> anymore (and did work for arrays only, if I remember correctly).
>
>
> Am Samstag, 20. Oktober 2018 15:39:39 UTC+2 schrieb Alex Deparvu:
>>
>> Hi,
>>
>> I'm trying to define a native binding for a java method, and can't figure
>> it out.
>>
>> The method is
>>     Iterable<? extends PropertyState> getProperties();
>>
>> I initially thought of this version:
>>     native getProperties :: Mutable s Tree -> ST s (Iterable (Mutable s
>> b))
>>
>> but the '? extends PropertyState' seems to break things, the error I get
>> is:
>>     The parameterized method <Iterable<b>>lazy(Lazy<Iterable<b>>) of type
>> Thunk is not applicable for the arguments (Iterable<capture#1-of ? extends
>> PropertyState>)
>>
>> I even tried the 'frege-native-gen' project, but that didn't came op with
>> better candidates.
>>
>> Can anyone suggest a better way?
>> Followup question, I thought I read somewhere that using '[]' for java
>> 'Iterable' return types is possible, but I couldn't figure that one out
>> (even for simpler examples).
>>
>> thanks a lot,
>> alex
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Frege Programming Language" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to frege-programming-language+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Frege Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to frege-programming-language+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to