1// errorcheck
2
3// Copyright 2020 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.
6
7package p
8
9import "time"
10
11type T int
12
13func (T) Mv()  {}
14func (*T) Mp() {}
15
16var _ = []int{
17	T.Mv,    // ERROR "cannot use T\.Mv|incompatible type"
18	(*T).Mv, // ERROR "cannot use \(\*T\)\.Mv|incompatible type"
19	(*T).Mp, // ERROR "cannot use \(\*T\)\.Mp|incompatible type"
20
21	time.Time.GobEncode,    // ERROR "cannot use time\.Time\.GobEncode|incompatible type"
22	(*time.Time).GobEncode, // ERROR "cannot use \(\*time\.Time\)\.GobEncode|incompatible type"
23	(*time.Time).GobDecode, // ERROR "cannot use \(\*time\.Time\)\.GobDecode|incompatible type"
24
25}
26