Open
Description
The iterate-over-empty-map.yaml
should exclude from results cases when the map is passed to a function - the function probably will write to it. We can use cross-function analysis from pro engine to check if there really are the writes.
package main
import "fmt"
func Do(y map[string]int64) int64 {
y["a"] = 1
y["b"] = 2
return 3
}
func main() {
fmt.Println("Hello, 世界")
x := map[string]int64{}
Do(x)
fmt.Printf("%d\n", len(x))
for k, v := range x {
fmt.Println(k, v)
}
}
Metadata
Metadata
Assignees
Labels
No labels