golang/go

cmd/compile: allows to define blank methods on builtin types

dvyukov opened this issue · 1 comments

go tool compile successfully compiles the following program:

package a

func (x int) _() {
    println(x)
}

func (x string) _() {
    println(x)
}

It must not be compiled.

go version devel +514014c Thu Jun 18 15:54:35 2015 +0200 linux/amd64

CL https://golang.org/cl/16866 mentions this issue.