1
0
mirror of https://github.com/golang/go synced 2024-11-15 02:30:31 -07:00
go/test/fixedbugs/issue15514.dir/c.go
Robert Griesemer 6394eb378e cmd/compile: export package for _ (blank) struct fields
Blank struct fields are regular unexported fields. Two
blank fields are different if they are from different
packages. In order to correctly differentiate them, the
compiler needs the package information. Add it to the
export data.

Fixes #15514.

Change-Id: I421aaca22b542fcd0d66b2d2db777249cad78df6
Reviewed-on: https://go-review.googlesource.com/27639
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2016-08-23 23:40:36 +00:00

11 lines
243 B
Go

// Copyright 2016 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 c
import "./a"
import "./b"
var _ a.A = b.B() // ERROR "cannot use b\.B"