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
7// Verify that method redeclarations are caught by the compiler.
8// Does not compile.
9
10package main
11
12type T struct { }
13func (t *T) M(int, string)	// GCCGO_ERROR "previous"
14func (t *T) M(int, float64) { }   // ERROR "redeclared|redefinition"
15
16func f(int, string)	// GCCGO_ERROR "previous"
17func f(int, float64) { }  // ERROR "redeclared|redefinition"
18
19func g(a int, b string)  // GCCGO_ERROR "previous"
20func g(a int, c string)  // ERROR "redeclared|redefinition"
21