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

9 lines
142 B
Go

package main
func (r *Rectangle) containsGood(x, y int) bool {
return r.x <= x &&
r.y <= y &&
x <= r.x+r.width &&
y <= r.y+r.height
}