Files
codeql/ql/test/query-tests/RedundantCode/ImpossibleInterfaceNilCheck/err.go
Max Schaefer fe56c207a3 Make ImpossibleInterfaceNilCheck more robust.
It no longer flags alerts that may be simply caused by missing type information.
2020-01-21 10:04:57 +00: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
}