Re: [go-nuts] bogus "missing return at end of function"

2019-06-09 Thread Marvin Renich
* Marvin Renich [190609 20:40]: > Is it already a known issue that a «for [true] { ... }» loop whose only > exit path is through return statements inside the loop (i.e. no break > statement) will produce the compiler error "missing return at end of > function" if you don't put a meaningless "retur

Re: [go-nuts] bogus "missing return at end of function"

2019-06-09 Thread Michal Strba
Can you post a code (preferably a link to play.golang.org) that does this? I can't reproduce it myself. On Mon, Jun 10, 2019, 02:40 Marvin Renich wrote: > Is it already a known issue that a «for [true] { ... }» loop whose only > exit path is through return statements inside the loop (i.e. no br

[go-nuts] bogus "missing return at end of function"

2019-06-09 Thread Marvin Renich
Is it already a known issue that a «for [true] { ... }» loop whose only exit path is through return statements inside the loop (i.e. no break statement) will produce the compiler error "missing return at end of function" if you don't put a meaningless "return ..." statement after the loop? If this