1// errorcheck -d=panic 2 3// Copyright 2018 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. 6 7// Verify that we get a single non-confusing error 8// message for embedded fields/interfaces that use 9// a qualified identifier with non-existing package. 10 11package p 12 13type _ struct { 14 F sync.Mutex // ERROR "undefined: sync|expected package|reference to undefined name" 15} 16 17type _ struct { 18 sync.Mutex // ERROR "undefined: sync|expected package|reference to undefined name" 19} 20 21type _ interface { 22 sync.Mutex // ERROR "undefined: sync|expected package|expected signature or type name|reference to undefined name" 23} 24