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

Change-Id: I876b22d1abbe7c3fe55cb486a65d0ace901f72e5
Reviewed-on: https://go-review.googlesource.com/52570
Reviewed-by: Than McIntosh <thanm@google.com>
1 file changed