Commit 5d0c2840 authored by Robert Griesemer's avatar Robert Griesemer
Browse files

cmd/compile/internal/types2: report argument type for unsafe.OffsetOf

Before parameterized types, unsafe.OffsetOf was always evaluating to
a constant. With parameterized types, the result may be a run-time
value, and unsafe.OffsetOf(x.f) is a call that is recorded. Also
record the argument x.f.

Fixes #47895.

Change-Id: Ia3da25028d4865d7295ce7990c7216bffe9e7c72
Reviewed-on: https://go-review.googlesource.com/c/go/+/344252


Trust: Robert Griesemer <gri@golang.org>
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: default avatarDan Scales <danscales@google.com>
parent 19585826
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment