compiler: finalize methods for type aliases of struct types

Previously we would finalize the methods of the alias type itself, but
since its a type alias we really need to finalize the methods of the
aliased type.

Also, handle method expressions of unnamed struct types.

Test case is https://golang.org/cl/251168.

Fixes golang/go#38125

Change-Id: I84c98883ae8641c5fa2b6c5209bf5ef9bb38e57b
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/251279
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
2 files changed