Fixes #6606.
LGTM=rsc
R=rsc
CC=golang-codereviews, gri
https://golang.org/cl/
156210044
if(n->op != ODCLFIELD || n->right == N)
fatal("ifacedcl");
+ if(isblank(n->left))
+ yyerror("methods must have a unique non-blank name");
+
dclcontext = PPARAM;
markdcl();
funcdepth++;
type B1 interface {
- _()
+ _() // ERROR "methods must have a unique non-blank name"
}
type B2 interface {
M()
- _()
+ _() // ERROR "methods must have a unique non-blank name"
}
type T2 struct{}
func main() {
shouldPanic(p1)
- shouldPanic(p2)
}
func p1() {
func (s *S) _() {}
-type B interface {
- _()
-}
-
-func p2() {
- var s *S
- var b B
- var e interface{}
- e = s
- b = e.(B)
- _ = b
-}
-
func shouldPanic(f func()) {
defer func() {
if recover() == nil {