[go] cmd/compile/internal/syntax: allow untyped composite literals

0 views
Skip to first unread message

Mark Freeman (Gerrit)

unread,
Jul 16, 2026, 2:43:36 PM (yesterday) Jul 16
to Robert Griesemer, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Russ Cox, golang...@luci-project-accounts.iam.gserviceaccount.com, Robert Griesemer, Gopher Robot, golang-co...@googlegroups.com

Mark Freeman submitted the change with unreviewed changes

Unreviewed changes

2 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:

```
The name of the file: src/cmd/compile/internal/syntax/parser.go
Insertions: 1, Deletions: 1.

@@ -1004,7 +1004,7 @@
}

// Operand = Literal | OperandName | MethodExpr | "(" Expression ")" .
-// Literal = BasicLit | [TypeName ] CompositeLit | FunctionLit .
+// Literal = BasicLit | [ TypeName ] CompositeLit | FunctionLit .
// BasicLit = int_lit | float_lit | imaginary_lit | rune_lit | string_lit .
// OperandName = identifier | QualifiedIdent.
func (p *parser) operand(keep_parens bool) Expr {
```

Change information

Commit message:
cmd/compile/internal/syntax: allow untyped composite literals

For #12854.
Change-Id: I424abb56fc2abb4d94425adba1aab04ebf974810
Reviewed-by: Mark Freeman <markf...@google.com>
Reviewed-by: Russ Cox <r...@golang.org>
Files:
  • M src/cmd/compile/internal/syntax/parser.go
  • A src/cmd/compile/internal/syntax/testdata/complit.go
Change size: M
Delta: 2 files changed, 37 insertions(+), 21 deletions(-)
Branch: refs/heads/master
Submit Requirements:
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I424abb56fc2abb4d94425adba1aab04ebf974810
Gerrit-Change-Number: 785200
Gerrit-PatchSet: 4
Gerrit-Owner: Robert Griesemer <g...@golang.org>
Gerrit-Reviewer: Mark Freeman <markf...@google.com>
Gerrit-Reviewer: Robert Griesemer <g...@google.com>
Gerrit-Reviewer: Russ Cox <r...@golang.org>
Gerrit-CC: Gopher Robot <go...@golang.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages