On Fri, Aug 26, 2022 at 12:42 AM Frank Schröder
<
frank.s...@gmail.com> wrote:
>
> Thank you. Are there plans to add a type constraint which would allow this? Maybe something like this?
>
> func slice[From implements To, To any](from []From) []To { ... }
There are no plans for this at present. Sorry.
> On Wednesday, August 24, 2022 at 7:30:22 AM UTC+2 Ian Lance Taylor wrote:
>>
>> On Tue, Aug 23, 2022 at 8:27 PM Frank Schröder
>> <
frank.s...@gmail.com> wrote:
>> >
>> > Is it possible to write a generic function which converts a slice of a concrete type to a slice of an interface that type implements? Something like this...
>>
>> I don't think so, at least not for any interface type. Sorry.
>>
>> Ian
>