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.
7 // Verify that method redeclarations are caught by the compiler.
14 func (t *T) M(int, string) // GCCGO_ERROR "previous"
15 func (t *T) M(int, float64) {} // ERROR "already declared|redefinition"
17 func (t T) H() // GCCGO_ERROR "previous"
18 func (t *T) H() {} // ERROR "already declared|redefinition"
20 func f(int, string) // GCCGO_ERROR "previous"
21 func f(int, float64) {} // ERROR "redeclared|redefinition"
23 func g(a int, b string) // GCCGO_ERROR "previous"
24 func g(a int, c string) // ERROR "redeclared|redefinition"