1// Copyright 2016 The Go Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5package a
6
7type T struct {
8}
9
10func F() []T {
11	return []T{T{}}
12}
13
14func Fi() []T {
15	return []T{{}} // element with implicit composite literal type
16}
17
18func Fp() []*T {
19	return []*T{&T{}}
20}
21
22func Fip() []*T {
23	return []*T{{}} // element with implicit composite literal type
24}
25
26func Gp() map[int]*T {
27	return map[int]*T{0: &T{}}
28}
29
30func Gip() map[int]*T {
31	return map[int]*T{0: {}} // element with implicit composite literal type
32}
33
34func Hp() map[*T]int {
35	return map[*T]int{&T{}: 0}
36}
37
38func Hip() map[*T]int {
39	return map[*T]int{{}: 0} // key with implicit composite literal type
40}
41