diff options
author | Russ Cox <rsc@golang.org> | 2008-11-04 09:45:27 -0800 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2008-11-04 09:45:27 -0800 |
commit | d8c046c5a10787a5d76418ec4755d69fc475ae1d (patch) | |
tree | ca6de2a651e24d6a924e91e70a1fd5ed78933708 /test/method2.go | |
parent | e8ee91b454ee862b8bade379d189d1a4eb09b813 (diff) | |
download | go-d8c046c5a10787a5d76418ec4755d69fc475ae1d.tar.gz |
move invalid method uses to new test
R=iant
DELTA=24 (13 added, 10 deleted, 1 changed)
OCL=18424
CL=18439
Diffstat (limited to 'test/method2.go')
-rw-r--r-- | test/method2.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/method2.go b/test/method2.go new file mode 100644 index 000000000..3ee0ae136 --- /dev/null +++ b/test/method2.go @@ -0,0 +1,14 @@ +// errchk $G $D/$F.go + +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package main + +type T struct {a int} +type P *T +type P1 *T + +func (p P) val() int { return 1 } // ERROR "receiver" +func (p *P1) val() int { return 1 } // ERROR "receiver" |