You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cmd/compile: function compiles OK with no return statement #49003
Activity
randall77 commentedon Oct 15, 2021
This is kind of a corner case in the definition of terminating statements.
Technically that
forstatement qualifies, so noreturnafter it is needed. There should maybe be an exception for afor rangestatement?go1.17 gets this correct (it gives an error).
gopherbot commentedon Oct 15, 2021
Change https://golang.org/cl/356189 mentions this issue:
cmd/compile: make for loops with range statements terminatinggriesemer commentedon Oct 15, 2021
Nice find!
gopherbot commentedon Oct 16, 2021
Change https://golang.org/cl/356411 mentions this issue:
go/types, types2: add test case for missing returngo/types, types2: add test case for missing return