FWIW, either way the error message is not related to order of evaluation or
anything. It always happens with nil-channels:
https://play.golang.org/p/aBga7KFN30x

On Wed, Aug 8, 2018 at 5:46 PM Sam Whited <s...@samwhited.com> wrote:

>
>
> On Wed, Aug 8, 2018, at 04:40, Jan Mercl wrote:
> > On Wed, Aug 8, 2018 at 11:15 AM Kaveh Shahbazian <
> kaveh.shahbaz...@gmail.com>
> > wrote:
> >
> > > But the error message (no cases) is confusing and unclear because
> > obviously there is a case there.
> >
> > I don't think it's confusing. The run-time message obviously does not
> talk
> > about the compile-time case presence but about no case the select
> statement
> > can, at run-time, randomly select one.
>
> This doesn't seem obvious to me. It says "no cases" not "no selectable
> cases". While I would expect a compile time error if no case statements was
> the actual problem, I probably would have assumed that this meant that at
> first too.
>
> —Sam
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts+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 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to