• Matthew Dempsky's avatar
    cmd/compile: preserve Type.nod in copytype · 5d0c20ef
    Matthew Dempsky authored
    By clearing out t.nod in copytype, we effectively lose the reference
    from a Type back to its declaring OTYPE Node. This means later in
    typenamesym when we add typenod(t) to signatlist, we end up creating a
    new OTYPE Node. Moreover, this Node's position information will depend
    on whatever context it happens be needed, and will be used for the
    Type's position in the export data.
    
    Updates #19391.
    
    Change-Id: Ied93126449f75d7c5e3275cbdcc6fa657a8aa21d
    Reviewed-on: https://go-review.googlesource.com/37870
    Run-TryBot: Matthew Dempsky <mdempsky@google.com>
    Run-TryBot: Robert Griesemer <gri@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarRobert Griesemer <gri@golang.org>
    5d0c20ef
bimport.go 29.5 KB