-
Couldn't load subscription status.
- Fork 18.4k
Open
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Description
For
$ cat y.go
package p
func f(x ..int) {}current gccgo reports the errors:
$ gccgo -c y.go
y.go:3:10: error: expected package
3 | func f(x ..int) {}
| ^
y.go:3:8: error: invalid named/anonymous mix
3 | func f(x ..int) {}
| ^
I would have expected an error at the .. as it is not a valid token.
For the reference, cmd/compile reports for the same file:
$ go tool compile y.go
y.go:3:11: syntax error: unexpected ., expecting name
which seems more sensible.
Metadata
Metadata
Assignees
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.