mirror of
https://github.com/golang/go
synced 2024-11-26 21:21:34 -07:00
92363d52c0
The code in #20162 contains an embedded interface. It didn't get dowidth'd by the frontend, and during DWARF generation, ngotype asked for a string description of it, which triggered a request for the number of fields in the interface, which triggered a dowidth, which is disallowed in the backend. The other changes in this CL are to support the test. Fixes #20162 Change-Id: I4d0be5bd949c361d4cdc89a8ed28b10977e40cf9 Reviewed-on: https://go-review.googlesource.com/42131 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
17 lines
370 B
Go
17 lines
370 B
Go
// compile -c=4
|
|
|
|
// Copyright 2017 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.
|
|
|
|
// Issue 20162: embedded interfaces weren't dowidth-ed by the front end,
|
|
// leading to races in the backend.
|
|
|
|
package p
|
|
|
|
func Foo() {
|
|
_ = (make([]func() interface {
|
|
M(interface{})
|
|
}, 1))
|
|
}
|