2017-01-23 15:24:24 -07:00
|
|
|
// errorcheck
|
|
|
|
|
|
|
|
// Copyright 2017 The Go Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
package p
|
|
|
|
|
|
|
|
type T struct{}
|
|
|
|
type A = T
|
|
|
|
type B = T
|
|
|
|
|
|
|
|
func (T) m() {}
|
2022-09-26 22:27:20 -06:00
|
|
|
func (T) m() {} // ERROR "already declared|redefinition"
|
|
|
|
func (A) m() {} // ERROR "already declared|redefinition"
|
|
|
|
func (A) m() {} // ERROR "already declared|redefinition"
|
|
|
|
func (B) m() {} // ERROR "already declared|redefinition"
|
|
|
|
func (B) m() {} // ERROR "already declared|redefinition"
|
2017-01-23 15:24:24 -07:00
|
|
|
|
2022-09-26 22:27:20 -06:00
|
|
|
func (*T) m() {} // ERROR "already declared|redefinition"
|
|
|
|
func (*A) m() {} // ERROR "already declared|redefinition"
|
|
|
|
func (*B) m() {} // ERROR "already declared|redefinition"
|