blob: dde7921d92f650e08983038173d53964d6d4a338 [file] [log] [blame]
Rémy Oudomphenga9e119a2013-08-29 10:00:58 +02001// compile
2
Emmanuel Odeke53fd5222016-04-10 14:32:26 -07003// Copyright 2013 The Go Authors. All rights reserved.
Rémy Oudomphenga9e119a2013-08-29 10:00:58 +02004// Use of this source code is governed by a BSD-style
5// license that can be found in the LICENSE file.
6
7// Issue 6140: compiler incorrectly rejects method values
8// whose receiver has an unnamed interface type.
9
10package p
11
12type T *interface {
13 m() int
14}
15
16var x T
17
18var _ = (*x).m
19
20var y interface {
21 m() int
22}
23
24var _ = y.m
25
26type I interface {
27 String() string
28}
29
30var z *struct{ I }
31var _ = z.String