-
-
Notifications
You must be signed in to change notification settings - Fork 390
Closed
Labels
Description
package main
func foo[T any](x T) {
if any(x) == nil {
println("is nil")
}
}
func main() {
foo[error](nil)
}
$ go run baz.go
is nil
$ run-dev-staticcheck baz.go
baz.go:4:5: this comparison is never true (SA4023)
baz.go:3:17: the lhs of the comparison gets its value from here and has a concrete type
ainar-g