mirror of
https://github.com/golang/go
synced 2024-11-12 00:30:22 -07:00
b03dce927b
Fixes #18392. Avoid nil dereferencing n.Right when dealing with non-existent self referenced interface methods e.g. type A interface{ Fn(A.Fn) } Instead, infer the symbol name from n.Sym itself. Change-Id: I60d5f8988e7318693e5c8da031285d8d7347b771 Reviewed-on: https://go-review.googlesource.com/34817 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
12 lines
254 B
Go
12 lines
254 B
Go
// 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 A interface {
|
|
Fn(A.Fn) // ERROR "type A has no method A.Fn"
|
|
}
|