compiler: only finalize embedded fields before finalizing methods
authorIan Lance Taylor <ian@gcc.gnu.org>
Wed, 2 Aug 2017 16:27:17 +0000 (16:27 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Wed, 2 Aug 2017 16:27:17 +0000 (16:27 +0000)
commitf12e8c3f66aa688af9dc5e5a185b6f238aee7926
treeeb35b7e42661e0fd9a8672831a9fa0bd347f3afc
parent893e8f7d87a6ace9a8bdedb5d18aab1f44fb11ca
compiler: only finalize embedded fields before finalizing methods

    When finalizing the methods of a named struct type, we used to
    finalize all the field types first.  That can fail if the field types
    refer indirectly to the named type.  Change it to just finalize the
    embedded field types first, and the rest of the fields later.

    Fixes golang/go#21253

    Reviewed-on: https://go-review.googlesource.com/52570

From-SVN: r250832
gcc/go/gofrontend/MERGE
gcc/go/gofrontend/gogo.cc