1// errorcheck
2
3// Copyright 2009 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 main
8
9type I interface{ m() }
10type T struct{ m func() }
11type M struct{}
12
13func (M) m() {}
14
15func main() {
16	var t T
17	var m M
18	var i I
19
20	i = m
21	// types2 does not give extra error "T.m is a field, not a method"
22	i = t // ERROR "not a method|has no methods|does not implement I"
23	_ = i
24}
25