OSDN Git Service

1f6a6dc9f731a4cd51ad7ebf4149bbe3845fa10e
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / go.test / test / fixedbugs / bug354.go
1 // $G $D/$F.go || echo BUG: bug354
2
3 // Copyright 2011 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.
6
7 // issue 2086
8 // was calling makeclosure twice on the closure
9
10 package main
11
12 import (
13         "os"
14 )
15
16 type Inner struct {
17         F func() os.Error
18 }
19
20 type Outer struct {
21         Inners []Inner
22 }
23
24 // calls makeclosure twice on same closure
25
26 var Foo = Outer{[]Inner{Inner{func() os.Error{ return nil }}}}