aboutsummaryrefslogtreecommitdiff
path: root/src/go/parser/parser.go
diff options
context:
space:
mode:
authorajz01 <ajzdenek@gmail.com>2019-10-22 02:51:33 +0000
committerRobert Griesemer <gri@golang.org>2019-10-22 04:05:25 +0000
commit57ad6ef15d8e1cbfd06223c538c0f250ca8e4df1 (patch)
treee6b3e549c184599e76a94ee7ae77844add665ebf /src/go/parser/parser.go
parent9979366e07fa8aa6fac81702a70f6eacf427c431 (diff)
downloadgo-57ad6ef15d8e1cbfd06223c538c0f250ca8e4df1.tar.gz
go-57ad6ef15d8e1cbfd06223c538c0f250ca8e4df1.zip
go/parser: remove superfluous case from switch statement
Change-Id: I96a9b34bf8e42c21a3e0258cbc8b1416328834be GitHub-Last-Rev: 32709619a690459dc29a32f12cfbd3908ce270e3 GitHub-Pull-Request: golang/go#35066 Reviewed-on: https://go-review.googlesource.com/c/go/+/202598 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
Diffstat (limited to 'src/go/parser/parser.go')
-rw-r--r--src/go/parser/parser.go1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/go/parser/parser.go b/src/go/parser/parser.go
index 35349611e8..3a468d096b 100644
--- a/src/go/parser/parser.go
+++ b/src/go/parser/parser.go
@@ -1446,7 +1446,6 @@ func (p *parser) checkExprOrType(x ast.Expr) ast.Expr {
switch t := unparen(x).(type) {
case *ast.ParenExpr:
panic("unreachable")
- case *ast.UnaryExpr:
case *ast.ArrayType:
if len, isEllipsis := t.Len.(*ast.Ellipsis); isEllipsis {
p.error(len.Pos(), "expected array length, found '...'")