diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2017-01-25 05:12:26 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2017-01-25 05:12:26 +0000 |
commit | 98e20758464f5cbfc60bd61a0cadd66ebb900d96 (patch) | |
tree | dc33fcfdbc083da77501abbf15d7d40655c1e3a0 /gcc/fortran/f95-lang.c | |
parent | 49d4fa438eab8a98541846b0213f5d23752ba2b4 (diff) | |
download | gcc-98e20758464f5cbfc60bd61a0cadd66ebb900d96.zip gcc-98e20758464f5cbfc60bd61a0cadd66ebb900d96.tar.gz gcc-98e20758464f5cbfc60bd61a0cadd66ebb900d96.tar.bz2 |
compiler: improvements for type alias handling
Give an error for an attempt to define a method on an imported type.
Give an error for each attempt to define a method on a builtin type.
Adjust error messages to be closer to gc error messages.
With these changes gccgo passes current tests on dev.typealias branch.
This changes the errors printed for test/fixedbugs/issue5089.go, but
the change is an improvement:
Before:
fixedbugs/issue5089.go:13:1: error: redefinition of ‘bufio.Buffered’: receiver name changed
func (b *bufio.Reader) Buffered() int { // ERROR "non-local|redefinition"
^
fixedbugs/issue5089.go:11:13: note: previous definition of ‘bufio.Buffered’ was here
import "bufio" // GCCGO_ERROR "previous"
^
Now:
fixedbugs/issue5089.go:13:7: error: may not define methods on non-local type
func (b *bufio.Reader) Buffered() int { // ERROR "non-local|redefinition"
^
Reviewed-on: https://go-review.googlesource.com/35642
From-SVN: r244889
Diffstat (limited to 'gcc/fortran/f95-lang.c')
0 files changed, 0 insertions, 0 deletions