compiler: better error message for unknown package name
[official-gcc.git] / gcc / testsuite / go.test / test / fixedbugs / issue27938.go
blobaecc67678ac28159d2265a68b0d4e553fe34fcf7
1 // errorcheck
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.
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.
11 package p
13 type _ struct {
14 F sync.Mutex // ERROR "undefined: sync|expected package|reference to undefined name"
17 type _ struct {
18 sync.Mutex // ERROR "undefined: sync|expected package|reference to undefined name"
21 type _ interface {
22 sync.Mutex // ERROR "undefined: sync|expected package|expected signature or type name|reference to undefined name"