mirror of
https://github.com/golang/go
synced 2024-09-05 16:04:50 +00:00
![Dan Scales](/assets/img/avatar_default.png)
It causes a crash because of the unexpected XDOT operation. It's not needed, since we will run ComputeAddrTaken() on function instantiations after stenciling. And it's not always correct, since we may not be able to distinguish between a array and a slice, if a type is dependent on a type param. However, we do need to call ComputeAddrTaken on instantiations created during inlining, since that is after the main ComputeAddrTaken pass. Fixes #49659 Change-Id: I0bb610cf11f14e4aa9068f6ca2a012337b069c79 Reviewed-on: https://go-review.googlesource.com/c/go/+/365214 Trust: Dan Scales <danscales@google.com> Run-TryBot: Dan Scales <danscales@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
14 lines
236 B
Go
14 lines
236 B
Go
// Copyright 2021 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 a
|
|
|
|
type A[T any] struct {
|
|
a int
|
|
}
|
|
|
|
func (a A[T]) F() {
|
|
_ = &a.a
|
|
}
|