2021-03-04 00:40:50 -07:00
|
|
|
// errorcheck -d=panic
|
2018-10-23 17:01:43 -06:00
|
|
|
|
|
|
|
// Copyright 2018 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.
|
|
|
|
|
|
|
|
// Verify that we get a single non-confusing error
|
|
|
|
// message for embedded fields/interfaces that use
|
|
|
|
// a qualified identifier with non-existing package.
|
|
|
|
|
|
|
|
package p
|
|
|
|
|
|
|
|
type _ struct {
|
2022-07-04 14:16:46 -06:00
|
|
|
F sync.Mutex // ERROR "undefined: sync|expected package|reference to undefined name"
|
2018-10-23 17:01:43 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
type _ struct {
|
2022-07-04 14:16:46 -06:00
|
|
|
sync.Mutex // ERROR "undefined: sync|expected package|reference to undefined name"
|
2018-10-23 17:01:43 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
type _ interface {
|
2022-07-04 14:16:46 -06:00
|
|
|
sync.Mutex // ERROR "undefined: sync|expected package|expected signature or type name|reference to undefined name"
|
2018-10-23 17:01:43 -06:00
|
|
|
}
|