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
// The following "return" statement causes a compiler error:
// CLOSURE [maing.go:18:5:var x int]
// <unknown line number>: internal compiler error: assertion failed.
return
x := 0
lblxAgain:
println("Hello World")
if x > 2 {
return
}
x++
goto lblxAgain
}
func main() {
foo()
}
What did you see happen?
CLOSURE [.../maing.go:16:5:var x int]
: internal compiler error: assertion failed
Please file a bug report including a short program that triggers the error. https://go.dev/issue/new
What did you expect to see?
Hello World
Hello World
Hello World
Hello World
The text was updated successfully, but these errors were encountered:
Go version
go version go1.22.0 linux/amd64
Output of
go env
in your module/workspace:What did you do?
https://go.dev/play/p/awjzjgM8zFV
package main
func foo() {
lblxAgain:
}
func main() {
foo()
}
What did you see happen?
CLOSURE [.../maing.go:16:5:var x int]
: internal compiler error: assertion failed
Please file a bug report including a short program that triggers the error.
https://go.dev/issue/new
What did you expect to see?
Hello World
Hello World
Hello World
Hello World
The text was updated successfully, but these errors were encountered: