Files
codeql/go/ql/test/query-tests/RedundantCode/ImpossibleInterfaceNilCheck/err.go
2022-05-20 10:07:19 -07:00

10 lines
178 B
Go

package main
import "fmt"
func errtest() {
x := unknownFunction()
var y interface{} = x
fmt.Println(y == nil) // OK since we don't know the return type of unknownFunction
}