2012-02-16 21:49:59 -07:00
|
|
|
// errorcheck
|
2011-11-02 10:18:53 -06:00
|
|
|
|
2016-04-10 15:32:26 -06:00
|
|
|
// Copyright 2011 The Go Authors. All rights reserved.
|
2011-11-02 10:18:53 -06:00
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
// issue 2343
|
|
|
|
|
|
|
|
package main
|
|
|
|
|
2014-10-20 20:04:12 -06:00
|
|
|
type T struct{}
|
2011-11-02 10:18:53 -06:00
|
|
|
|
|
|
|
func (t *T) pm() {}
|
2014-10-20 20:04:12 -06:00
|
|
|
func (t T) m() {}
|
2011-11-02 10:18:53 -06:00
|
|
|
|
|
|
|
func main() {
|
|
|
|
p := &T{}
|
|
|
|
p.pm()
|
|
|
|
p.m()
|
|
|
|
|
|
|
|
q := &p
|
|
|
|
q.m() // ERROR "requires explicit dereference"
|
2014-10-20 20:04:12 -06:00
|
|
|
q.pm() // ERROR "requires explicit dereference"
|
2011-11-02 10:18:53 -06:00
|
|
|
}
|