Russ Cox | d2cc988 | 2012-02-16 23:50:37 -0500 | [diff] [blame] | 1 | // errorcheck |
Russ Cox | 7dd9062 | 2012-02-11 01:21:12 -0500 | [diff] [blame] | 2 | |
Emmanuel Odeke | 53fd522 | 2016-04-10 14:32:26 -0700 | [diff] [blame] | 3 | // Copyright 2012 The Go Authors. All rights reserved. |
Russ Cox | 7dd9062 | 2012-02-11 01:21:12 -0500 | [diff] [blame] | 4 | // Use of this source code is governed by a BSD-style |
| 5 | // license that can be found in the LICENSE file. |
| 6 | |
| 7 | package p |
| 8 | |
| 9 | type T struct { |
| 10 | X int |
| 11 | } |
| 12 | |
Ian Lance Taylor | 6ed800c | 2012-09-28 08:30:30 -0700 | [diff] [blame] | 13 | func (t *T) X() {} // ERROR "type T has both field and method named X|redeclares struct field name" |