diff --git a/syntax/filetests_test.go b/syntax/filetests_test.go
index <HASH>..<HASH> 100644
--- a/syntax/filetests_test.go
+++ b/syntax/filetests_test.go
@@ -1637,6 +1637,13 @@ var fileTests = []testCase{
 		},
 	},
 	{
+		Strs: []string{`${foo[@]}`},
+		bash: &ParamExp{
+			Param: lit("foo"),
+			Ind:   &Index{Expr: litWord("@")},
+		},
+	},
+	{
 		Strs: []string{`${foo[*]-etc}`},
 		bash: &ParamExp{
 			Param: lit("foo"),
diff --git a/syntax/parser.go b/syntax/parser.go
index <HASH>..<HASH> 100644
--- a/syntax/parser.go
+++ b/syntax/parser.go
@@ -949,8 +949,12 @@ func (p *parser) paramExp() *ParamExp {
 		}
 		lpos := p.pos
 		p.quote = paramExpInd
-		if p.next(); p.tok == star {
+		p.next()
+		switch p.tok {
+		case star:
 			p.tok, p.val = _LitWord, "*"
+		case at:
+			p.tok, p.val = _LitWord, "@"
 		}
 		pe.Ind = &Index{
 			Expr: p.arithmExpr(leftBrack, lpos, 0, false, false),
syntax: parse ${foo[@]} properly again

This is a regression from <I>d<I>, which introduced support for
${foo@bar}. '@' is now a token in this context, so make sure it's
handled separately like '*'.