mirror of
https://github.com/golang/go
synced 2024-11-13 18:50:24 -07:00
cc422e64d0
For golang.org/cl/74110, I forgot that you can use range-based for loops to extract key values from a map value. This wasn't a problem for the binary format importer, because it was more tolerant about missing inline function bodies. However, the indexed importer is more particular about this. We could potentially just make it more lenient like the binary importer, but tweaking the logic here is easy enough and seems like the preferable solution. Fixes #26341. Change-Id: I54564dcd0be60ea393f8a0f6954b7d3d61e96ee5 Reviewed-on: https://go-review.googlesource.com/123475 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Heschi Kreinick <heschi@google.com>
14 lines
235 B
Go
14 lines
235 B
Go
// Copyright 2018 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package b
|
|
|
|
import "./a"
|
|
|
|
func f() {
|
|
for k := range (a.M{}) {
|
|
k.F()
|
|
}
|
|
}
|