-
Notifications
You must be signed in to change notification settings - Fork 17.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/compile: better error for embedded field referring to missing import
Fixes #27938. Change-Id: I16263ac6c0b8903b8a16f02e8db0e1a16d1c95b4 Reviewed-on: https://go-review.googlesource.com/c/144261 Reviewed-by: Matthew Dempsky <mdempsky@google.com>
- Loading branch information
Showing
2 changed files
with
31 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// errorcheck | ||
|
||
// 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 { | ||
F sync.Mutex // ERROR "undefined: sync" | ||
} | ||
|
||
type _ struct { | ||
sync.Mutex // ERROR "undefined: sync" | ||
} | ||
|
||
type _ interface { | ||
sync.Mutex // ERROR "undefined: sync" | ||
} |