-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/compile: accepts invalid function type #11595
Comments
@griesemer for spec treatment |
The spec does allow parentheses around types, but not around parameter names; e.g.: func((int), (float32)) ((int)) is valid. The example above is incorrect because it mixes parameters with names (_) and w/o names (1st parameter). |
To be clear, the problem still exists on go1.6.2 but on tip (go1.7) but seems fixed |
This may have been fixed a while back with https://go-review.googlesource.com/20748 . Closing. |
gc successfully compiles the following code:
both gccgo and gotype reject it saying:
Spec does not allow parenthesis there.
go version devel +be2a3e2 Thu Jul 2 08:29:33 2015 +0000 linux/amd64
The text was updated successfully, but these errors were encountered: