Re: [go-nuts] Re: [generics] (again). Type inference is somewhat weak

2020-06-18 Thread Ian Lance Taylor
On Thu, Jun 18, 2020 at 12:23 AM roger peppe wrote: > > Yes, I agree. It seems to have trouble inferring types when the argument is a > generic interface type. > Here's a simpler example: https://go2goplay.golang.org/p/3-aVhD6Y9R2 > I think this is probably https://github.com/golang/go/issues/396

Re: [go-nuts] Re: [generics] (again). Type inference is somewhat weak

2020-06-18 Thread roger peppe
Yes, I agree. It seems to have trouble inferring types when the argument is a generic interface type. Here's a simpler example: https://go2goplay.golang.org/p/3-aVhD6Y9R2 I think this is probably https://github.com/golang/go/issues/39661 cheers, rog. On Thu, 18 Jun 2020 at 02:14, Denis Cher

[go-nuts] Re: [generics] (again). Type inference is somewhat weak

2020-06-17 Thread Denis Cheremisov
Better example. A method to request for exacly one element from the gRPC bistream. A thing that is frequently needed when there're lots of bistream gRPC methods. https://go2goplay.golang.org/p/RQEyhRRQb0p IRL I would need to call it as resp, err := proto.ReadOne(service.Service_MethodClient,