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 program has multiple problems, including that x is undefined:
% cat /tmp/x.go
package p
func g() int
func h(int)
var b bool
func f() {
did := g()
if !did && b {
h(x)
}
}
% go tool compile /tmp/x.go
/tmp/x.go:10:5: invalid operation: !did (operator ! not defined on int)
%
Note the lack of error about x. The problem is the compiler is panicking due to the first error (and hiding that panic as it should). We should fix the panic though:
This program has multiple problems, including that x is undefined:
Note the lack of error about x. The problem is the compiler is panicking due to the first error (and hiding that panic as it should). We should fix the panic though:
Using compiler built fresh just now, from 0b9ca4d.
/cc @findleyr @griesemer
The text was updated successfully, but these errors were encountered: