mirror of
https://github.com/golang/go
synced 2024-11-24 01:40:12 -07:00
cf51fb5d68
This CL avoids a useless follow-on error (that gets reported before the actual error due to source position). This addresses the first part of the issue below. Thanks to @cuonglm for the suggestion for the fix. For #49005. Change-Id: Ifdd83072a05c32e115dc58a0233868a64f336f3f Reviewed-on: https://go-review.googlesource.com/c/go/+/356449 Trust: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
14 lines
264 B
Go
14 lines
264 B
Go
// errorcheck
|
|
|
|
// Copyright 2021 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 interface{ M() }
|
|
|
|
func F() T
|
|
|
|
var _ = F().(*X) // ERROR "undefined: X"
|