[AArch64] SVE tests
[official-gcc.git] / gcc / testsuite / go.test / test / method1.go
blob365b8ca553dafe8490611fc56ca91acd3c4f7564
1 // errorcheck
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.
8 // Does not compile.
10 package main
12 type T struct { }
13 func (t *T) M(int, string) // GCCGO_ERROR "previous"
14 func (t *T) M(int, float64) { } // ERROR "redeclared|redefinition"
16 func f(int, string) // GCCGO_ERROR "previous"
17 func f(int, float64) { } // ERROR "redeclared|redefinition"
19 func g(a int, b string) // GCCGO_ERROR "previous"
20 func g(a int, c string) // ERROR "redeclared|redefinition"