Files
yaegi/_test/map31.go
T
Marc Vertes c828692c0b fix: don't panic in map range if assigned value is _
Ensure that the code generated for `for s, _ = range ...` is the same as `for s = range ...`.

Fixes #1622.
2024-04-25 20:20:04 +02:00

14 lines
134 B
Go

package main
func main() {
myMap := map[string]int{"a":2}
for s, _ := range myMap {
_ = s
}
println("ok")
}
// Output:
// ok