]> Cypherpunks repositories - gostls13.git/commitdiff
go/parser: remove superfluous case from switch statement
authorajz01 <ajzdenek@gmail.com>
Tue, 22 Oct 2019 02:51:33 +0000 (02:51 +0000)
committerRobert Griesemer <gri@golang.org>
Tue, 22 Oct 2019 04:05:25 +0000 (04:05 +0000)
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>
src/go/parser/parser.go

index 35349611e8b7318bac247dcaa77fbad874211468..3a468d096bca58a5191b9acb3d3ab55a6ec4675e 100644 (file)
@@ -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 '...'")