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

Comments

Projects
None yet
3 participants
@mdempsky
Copy link
Member

commented Oct 18, 2017

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

This comment has been minimized.

Copy link
Member Author

commented Oct 18, 2017

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

@ALTree

This comment has been minimized.

Copy link
Member

commented Oct 18, 2017

This is #15992

@mdempsky

This comment has been minimized.

Copy link
Member Author

commented Oct 18, 2017

Closing as dup.

@mdempsky mdempsky closed this Oct 18, 2017

@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.
You can’t perform that action at this time.