Update to current master Go testsuite.
[official-gcc.git] / gcc / testsuite / go.test / test / method2.go
bloba72536e7b33da791d64ac328f778ada44d46fc31
1 // errchk $G $D/$F.go
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 package main
9 type T struct {
10 a int
12 type P *T
13 type P1 *T
15 func (p P) val() int { return 1 } // ERROR "receiver"
16 func (p *P1) val() int { return 1 } // ERROR "receiver"
18 type Val interface {
19 val() int
22 var _ = (*Val).val // ERROR "method"
24 var v Val
25 var pv = &v
27 var _ = pv.val() // ERROR "method"