From d8c046c5a10787a5d76418ec4755d69fc475ae1d Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Tue, 4 Nov 2008 09:45:27 -0800 Subject: move invalid method uses to new test R=iant DELTA=24 (13 added, 10 deleted, 1 changed) OCL=18424 CL=18439 --- test/method2.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 test/method2.go (limited to 'test/method2.go') 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" -- cgit v1.2.1