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

"var re, im = complexSqrt(-1)" is not accepted by 8g #188

Closed
gopherbot opened this issue Nov 14, 2009 · 4 comments
Closed

"var re, im = complexSqrt(-1)" is not accepted by 8g #188

gopherbot opened this issue Nov 14, 2009 · 4 comments

Comments

@gopherbot
Copy link

by trost-g@cloud.rain.com:

According to http://golang.org/doc/go_spec.html#Variable_declarations the
following code is valid:

  func complexSqrt(i int) (int, int) {return 0, 1}
  var re, im = complexSqrt(-1)

However, 8c generates the following error when I compile it

  multiple-value complexSqrt() in single-value context

Not clear if it's the docs or the compiler that's in error.


GOARCH=386
GOOS=linux


$ hg id
b51fd2d6c160 release/release.2009-11-10.1
@rsc
Copy link
Contributor

rsc commented Nov 15, 2009

Comment 1:

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Nov 15, 2009

Comment 2:

Labels changed: added compiler-bug.

Owner changed to r...@golang.org.

@rsc
Copy link
Contributor

rsc commented Nov 15, 2009

Comment 3:

Status changed to Started.

@rsc
Copy link
Contributor

rsc commented Nov 15, 2009

Comment 4:

Fixed by http://code.google.com/p/go/source/detail?r=7e66bbd556

Status changed to Fixed.

This issue was closed.
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

3 participants