Skip to content
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: improved error for "too many arguments for return" #4215

Closed
ghost opened this issue Oct 8, 2012 · 9 comments
Closed

cmd/compile: improved error for "too many arguments for return" #4215

ghost opened this issue Oct 8, 2012 · 9 comments

Comments

@ghost
Copy link

ghost commented Oct 8, 2012

1. What is a short input program that triggers the error?

func foo {
 return 1
}

2. What is the full compiler output?

too many arguments to return

3. What version of the compiler are you using?  (Run it with the -V flag.)

1.0.2


It would be nice if the above error message suggested you forgot the return type, and
potentially even suggested what it should be.
@rsc
Copy link
Contributor

rsc commented Oct 9, 2012

Comment 1:

Labels changed: added priority-later, go1.1maybe, removed priority-triage, go1.1.

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Mar 12, 2013

Comment 2:

[The time for maybe has passed.]

Labels changed: removed go1.1maybe.

@rsc
Copy link
Contributor

rsc commented Jul 30, 2013

Comment 3:

Labels changed: added go1.3.

@robpike
Copy link
Contributor

robpike commented Aug 20, 2013

Comment 4:

Labels changed: removed go1.3.

@rsc
Copy link
Contributor

rsc commented Nov 27, 2013

Comment 5:

Labels changed: added go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 6:

Labels changed: added release-none, removed go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 7:

Labels changed: added repo-main.

@ghost ghost added accepted labels Dec 4, 2013
@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@rsc rsc changed the title cmd/gc: improved error for "too many arguments for return" cmd/compile: improved error for "too many arguments for return" Jun 8, 2015
@odeke-em
Copy link
Member

I've mailed CL https://go-review.googlesource.com/#/c/25156.

@gopherbot
Copy link

CL https://golang.org/cl/25156 mentions this issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants