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
This isn't a bug, unless am mistaken but the deal is that jumping to a label shouldn't cause new variables to come into scope if it wasn't already in scope i.e
goto L
X:=0L:
introduces a new variable X to go into scope. The original bug declared a type not a variable
X:=0goto L
L:
and
goto L
L:
X:=0
are correct but not the code reported.
For extra reference, we can take a look at the spec as well https://golang.org/ref/spec#GotoStmt with the same example coincidentally quoted there.
Please answer these questions before submitting your issue. Thanks!
related to #8042 , this program does not compile:
What did you do?
try to compile above
What did you expect to see?
to compile OK
What did you see instead?
error:
System details
The text was updated successfully, but these errors were encountered: