Spot the bug in the map[any] lookup

from Interfaces
Go 1.27 intermediate 4 min 1 issue to find

Find why a valid any value can make this lookup panic.

Go
func AlreadySeen(seen map[any]bool, value any) bool {
    return seen[value]
}

func example() bool {
    seen := map[any]bool{"ready": true}
    return AlreadySeen(seen, []int{1, 2})
}
Open in playground
Report an error