Files
codeql/go/ql/test/query-tests/RedundantCode/CompareIdenticalValues/vp.go
2026-06-11 07:15:54 +02:00

18 lines
213 B
Go

package main
type baseT struct {
length int
}
func (x *baseT) GetLength() int {
return x.length
}
type t struct {
baseT
}
func (x *t) foo(other t) bool {
return x.GetLength() != x.GetLength() // $ Alert
}