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: erroneously rejects copy(f()) where f() is multi-valued #22328

Closed
mdempsky opened this issue Oct 18, 2017 · 3 comments
Closed

cmd/compile: erroneously rejects copy(f()) where f() is multi-valued #22328

mdempsky opened this issue Oct 18, 2017 · 3 comments

Comments

@mdempsky
Copy link
Member

At tip, cmd/compile rejects this package with "missing arguments to copy":

package p
func f() ([]byte, string) { return nil, "" }
var _ = copy(f())

The same package is accepted by go/types and gccgo, and seemingly valid according to the spec.

@mdempsky
Copy link
Member Author

Notably cmd/compile does handle complex(func() (float64, float64) { return 0, 0 }()) correctly.

@ALTree
Copy link
Member

ALTree commented Oct 18, 2017

This is #15992

@mdempsky
Copy link
Member Author

Closing as dup.

@golang golang locked and limited conversation to collaborators Oct 18, 2018
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