mirror of
https://github.com/golang/go
synced 2024-11-02 13:42:29 +00:00
398bf9d5a0
This restores go.errors from before3af0d79
along with a fixed up version of the bisonerrors AWK script, translated to Go. However, this means Yyerror needs access to the yacc parser's state, which is currently private. To workaround that, add a "state" accessor method like the Lookahead method added inc7fa3c6
. Update issue #9968. Change-Id: Ib868789e92fdb7d135442120a392457923e50121 Reviewed-on: https://go-review.googlesource.com/7270 Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
17 lines
325 B
Go
17 lines
325 B
Go
// errorcheck
|
|
|
|
// Copyright 2009 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package main
|
|
|
|
type T func()
|
|
|
|
type I interface {
|
|
f, g (); // ERROR "name list not allowed"
|
|
}
|
|
|
|
type J interface {
|
|
h T; // ERROR "syntax|signature"
|
|
}
|