|author||Ian Lance Taylor <firstname.lastname@example.org>||Mon Jul 19 11:53:05 2021 -0700|
|committer||Ian Lance Taylor <email@example.com>||Mon Jul 19 23:46:19 2021 +0000|
compiler: avoid aliases in receiver types If a package declares a method on an alias type, the alias would be used in the export data. This would then trigger a compiler assertion on import: we should not be adding methods to aliases. Fix the problem by ensuring that receiver types do not use alias types. This seems preferable to consistently avoiding aliases in export data, as aliases can cross packages. And it's painful to try to patch this while writing the export data, as at that point all the types are known. Test case is https://golang.org/cl/335172. Fixes golang/go#47131 Change-Id: Ic1fa7feddc3ff19c22c5c112bc06236b8c9d010a Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/335729 Trust: Ian Lance Taylor <firstname.lastname@example.org> Reviewed-by: Cherry Mui <email@example.com> Reviewed-by: Than McIntosh <firstname.lastname@example.org>
Ian Lance Taylor Last update 15 June 2014
This is a compiler frontend for the Go programming language. The frontend was originally developed at Google, and was released in November 2009. It was originally written by Ian Lance Taylor.
It was originally written for GCC. As of this writing it only supports GCC, but the GCC support has been separated from the rest of the frontend, so supporting another compiler is feasible.
The go subdirectory holds the frontend source code. This is mirrored to the gcc/go subdirectory in the GCC repository.
The libgo subdirectory holds the library source code. This is a copy of the main Go library with various changes appropriate for this compiler. The main Go library is hosted at http://go.googlesource.com/go, in the src directory. The libgo subdirectory is mirrored to the libgo subdirectory in the gcc repository.
To contribute patches to the files in this directory, please see Contributing to the gccgo frontend.
The master copy of these files is hosted in Gerrit (there is a mirror at Github). Changes to these files require signing a Google contributor license agreement. If you are the copyright holder, you will need to agree to the Google Individual Contributor License Agreement. This agreement can be completed online.
If your organization is the copyright holder, the organization will need to agree to the Google Software Grant and Corporate Contributor License Agreement.
If the copyright holder for your code has already completed the agreement in connection with another Google open source project, it does not need to be completed again.