Skip to content

cmd/compile: accepts invalid function type #11595

Closed
@dvyukov

Description

@dvyukov

gc successfully compiles the following code:

package a
var f func((i), _ int)

both gccgo and gotype reject it saying:

error: invalid named/anonymous mix
expected identifier

Spec does not allow parenthesis there.
go version devel +be2a3e2 Thu Jul 2 08:29:33 2015 +0000 linux/amd64

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions