Debian Codegraph @

gcc/testsuite/go.test/test/fixedbugs/issue30956.go

raw
1 // run
2
3 // Copyright 2019 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 // Check for compile generated static data for literal
8 // composite struct
9
10 package main
11
12 import "fmt"
13
14 type X struct {
15 V interface{}
16
17 a int
18 b int
19 c int
20 }
21
22 func pr(x X) {
23 fmt.Println(x.V)
24 }
25
26 func main() {
27 pr(X{
28 V: struct {
29 A int
30 }{42},
31 })
32 }