Merge from mainline (167278:168000).
[official-gcc/graphite-test-results.git] / gcc / testsuite / go.test / test / fixedbugs / bug223.go
blob80f9cae8199c78a3dc7e8018e106d61b1d7d9f41
1 // (! $G $D/$F.go) | grep 'initialization loop' >/dev/null || echo BUG: bug223
3 // Copyright 2009 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
7 // check that initialization loop is diagnosed
8 // and that closure cannot be used to hide it.
9 // error message is not standard format, so no errchk above.
11 package main
13 type F func()
15 func f() {
16 if true {
17 _ = func() { _ = m }
21 var m = map[string]F{"f": f}